Getting the template name

In a template, I can bind the name of the template to a property (eg: a textbox in the template can display the template name)

If I then create an instance of that template and give in a different (meaningful) name, that textbox will not display the new name.

How can I bind to the name of the instantiated template to a property in that template?

You can’t bind to the instance name. In this situation you have to add a template parameter for the name to display.

Feature Request: Let us do this.

This breaks how I make things fast. By giving the component the right name, I can bind all the bits of the component to use the name in the bind path, or pass it off to the scripting function to open the right window etc.

Now I have to create the component, name it, select it, edit the property with the same name. :frowning:

Ok, you have pulled my leg. I have put in a request for this :slight_smile:

Ok I added a new read-only property called “instanceName” on the template for 7.5.5

2 Likes

Thanks Carl,

I’ll try it out.