How to automatically set the attribute?
-
Hello.
I often use the "Rename by Layer" plugin and would like to change my DC for this. How to automatically set the attribute AAA_Name name Instance? Is it possible? I hope from the picture you will understand. Sorry for my English.
-
=_name returns the original component definition name, there is no instance name, I believe its part of a different definition set, you can see it when inspecting "drawing elements"
there is no DC way of getting the instance name, only viewing it in both the option dialog title and the attribute dialog header provided the name attribute is not used.
however you could use a scriptsel = Sketchup.active_model.selection sel.grep(Sketchup;;ComponentInstance).each do |s| s.set_attribute "dynamic_attributes","aname",s.name $dc_observers.get_latest_class.redraw_with_undo(s) end
I use toolbar editor to store and run such scripts. In that you can create a button and assign the script.
You then include "aname" or an attribute of your choosing an create other formula / relationships for your data, reports....
Advertisement