Search code examples
sketchup

Sketchup - Is it possible to display the name of a Component dynamically in a Text tag?


Sketchup - Is it possible to display the name of a Component dynamically in a Text tag?

I want the Text to change if I rename the Component, the way dimensions change when you change its size.


Solution

  • You could use an observer to detect when the name change and then update the Text object. I think DefinitionsObserver with the onComponentPropertiesChanged event should work for that. You need to find a way to keep track of which text element to update though.