Hi,
I am using events in a workflow where the macro after the interactive measurements uses stepback (after some reading of measurement data from the event and after changing the name and the stroke and text color). After the stepback and bak in the interctive measurement workbench the color remains changed but the name is changed back to the default ("Event 1"). How can I make the name stay changed?
BR
Fredrik Olsson
Keep the name of the graphical element when using stepback
Hi,
Thank you for you ranswer. As a workaround I tried to include that one could double-click on the events graphical object in the interactive workbench and write a descriptive name, but could not see how to extract this annotation text from the event object? This name seems to stay and its color could be set by the subsequent macro and it would be a nice solution if I could extract the actual text. I know that the measurement text is something else (default just Number).
BR
Fredrik Olsson
Thank you for you ranswer. As a workaround I tried to include that one could double-click on the events graphical object in the interactive workbench and write a descriptive name, but could not see how to extract this annotation text from the event object? This name seems to stay and its color could be set by the subsequent macro and it would be a nice solution if I could extract the actual text. I know that the measurement text is something else (default just Number).
BR
Fredrik Olsson
Dear Fredrik Olsson,
I would like to mention some aspects:
First, it is correct that the 'annotation text' is missing in the Graphic-Class. We have now added the attribute 'CustomText' so that it will be available for programming. This feature is supposed to come with one of the next hotfixes.
Second, stepping back in a workflow should reset all attributes to the state when leaving the task. Therefore changing the name back to the default ("Event 1") is correct and keeping the colors etc. is definitely wrong (bug). We understand your case and therefore will not ‘fix this bug’, but we have to think about a proper solution that will also solve your requirement in a certain way. Please keep in mind that after the redesign, it is not guaranteed that the workaround you used will operate anymore.
I would like to mention some aspects:
First, it is correct that the 'annotation text' is missing in the Graphic-Class. We have now added the attribute 'CustomText' so that it will be available for programming. This feature is supposed to come with one of the next hotfixes.
Second, stepping back in a workflow should reset all attributes to the state when leaving the task. Therefore changing the name back to the default ("Event 1") is correct and keeping the colors etc. is definitely wrong (bug). We understand your case and therefore will not ‘fix this bug’, but we have to think about a proper solution that will also solve your requirement in a certain way. Please keep in mind that after the redesign, it is not guaranteed that the workaround you used will operate anymore.
Thank you for your answer!
My final workaround is less dependent on the "bug" with colors. I pass information within the workflow by using setoutputvalues, like:
I add ordinary text to the image to mark the phase type and use Events as marker of the phase. The solution can easily accomodate changes in color memory by connecting also colors to order instead of only recent by change in type of dictionnarie. Default colors can be used for Events while marking and afterwards adjusted to selected color.
Best regards
Fredrik Olsson
My final workaround is less dependent on the "bug" with colors. I pass information within the workflow by using setoutputvalues, like:
Code: Select all
import collectios as Coll
ParameterDic = Coll.OrderedDict()
RecentColor = {'Last':col}
ParameterDic[phase] = 0
Zen.Application.ActiveWorkbench.SetOutputValue(ParameterDic, "ParameterDic")
Zen.Application.ActiveWorkbench.SetOutputValue(RecentColor, "RecentColor")
Best regards
Fredrik Olsson