Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: Property Setter Events from within Nested Design
Reply to topic
Author Message
EMebane



Joined: Apr 15, 2019
Posts: 73

PostPosted: Aug 25, 2019 12:50 PM    Post subject: Property Setter Events from within Nested Design

Is there a good solution for enabling a Property Setter within a Nested Design to set properties on Elements that are siblings to the Nested Design?

My first effort was to try connecting a Property Setter within a Nested Design to an Output ports on the Nested design: Out1(event). The Property in the Properties panel for the Property Setter only allows me to select Output Names.

I also tried connecting the Property Setter to the event nub on the bottom of the Nested Outputs Element: E1(event)

The problem is that a Property Setter is expected to specify what Property to set on the target Element. My Nested Design gets an Out(event) right-facing blue nub as a result of one of the above configurations (I don't know which). However, although it can be connected to the square blue nub on the bottom of another Element (such as a Nested Design Threshold Element) there is no effect because the Property Setter does not specify what Property to set on the Nested Design Threshold Element.
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Aug 25, 2019 1:53 PM    Post subject:

I seem to remember there is way to propagate a blue connection to a nested design (by creating a blue input), but would have to experiment (can't remember that now).

But if I was doing it, I would put the PropertySetter inside the target design (which contains the element you wish to modify). And then activate it via its input, which can be propagated through NestedDesign element's inputs. I think that is a cleaner way.
EMebane



Joined: Apr 15, 2019
Posts: 73

PostPosted: Aug 25, 2019 4:03 PM    Post subject:

Relocating the property setter makes good sense.

This means editing an existing Nested Design. Is there a way to prevent updated Nested Designs from being reset, repositioned, and resized after they are edited? You may have suggested Advanced Properties > Nested Initialization setting for this in another thread. Would you describe what this setting does in more detail? e.g., Load global properties, Load global and save, Load/Save local properties.
jarek



Joined: Oct 22, 2007
Posts: 746

PostPosted: Aug 25, 2019 4:25 PM    Post subject:

"Load global properties" loads all original properties of the target design.

"Load/save global properties" as above, but also saves those properties back to the original design file (when you save the main design).

"Load/Save local properties" option is significantly different. It keeps a copy of all the original properties in local settings (saved by the main design by each NestedDesign element). So that several instances of the same source design are possible with different settings. But that comes at a price: the reset you don't like. Which is understandable but unavoidable, because when you edit the original design, the locally kept properties you have can't be mapped directly to that design any more. The reset simply creates a new copy from the original properties. You might think there should be a way to do this more intelligently, and preserve the part of the properties which are not edited, but unfortunately in the backend this is a lot more compliated than it seems, I wouldn't want to mess with it.
EMebane



Joined: Apr 15, 2019
Posts: 73

PostPosted: Aug 29, 2019 10:01 PM    Post subject:

OK, it's good to know there's no workaround for that reset when I edit a Nested Design. The other details are also helpful.
Reply to topic