Keep the name of the graphical element when using stepback

In this subforum specific Topics concerning ZEN Core, e.g workbenches, are discussed
Post Reply
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Keep the name of the graphical element when using stepback

Post by user-6033 »

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
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

Dear Fredrik Olsson,

yes, you are right. From your point of view, this is a strange behavior. The reason for this is that the interactive measurement workbench is not designed to be used like that.

I fully understand your requirement and will put it on the To Do list.

Thanks for your contribution!
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Post by user-6033 »

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
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

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.
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Post by user-6033 »

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:

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")
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
Post Reply