Dynamic Custom Property Assignment


I have created a User Defined Type of a Transformer, with two instances.

I also have a symbol with a custom property. When I select which tag to assign to the custom property, i have the ability to select a specific tag, a specific member of one of the transformer instances.


So if I want to have the same symbol at the same point of the screen for all the instances, I am stuck with creating one symbol instance for each transformer instance and play with the symbol visibility. This is not dynamic. Is there a way, for example to put "Transformer_00*._Current" as the value ?
Or maybe have a 'selector' tag with 0 and 1 as possible values and set to the custom property something like this?

Or , generally, how to dynamically change the assigned tag to a custom property?

Even if it possible with scripting, can we have a best practice example? 

Parents
  • Yes!

    There's a property on the symbol called "Owning object" which allows you to bind the graphic to a different instance.

    To do so, you'll need to:

    1. Change the symbol so that all references start with "Me." instead of the name of the first instance.
    2. In runtime, write the name of any instance to the ObjectObject property and the entire graphic will bind to that instance

    You had the right idea, just put "Me" instead of "Transformer_00*" and then set the OwningObject property whatever Transformer that you want to see.

Reply
  • Yes!

    There's a property on the symbol called "Owning object" which allows you to bind the graphic to a different instance.

    To do so, you'll need to:

    1. Change the symbol so that all references start with "Me." instead of the name of the first instance.
    2. In runtime, write the name of any instance to the ObjectObject property and the entire graphic will bind to that instance

    You had the right idea, just put "Me" instead of "Transformer_00*" and then set the OwningObject property whatever Transformer that you want to see.

Children