How to automatically set the attribute?

How to automatically set the attribute?

Postby kostiaarh » Sat Mar 02, 2019 11:31 pm

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.


Re: How to automatically set the attribute?

Postby pcmoor » Sun Mar 03, 2019 5:40 am

=_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.
Capture 2.JPG

however you could use a script

Code: Select all
  sel = Sketchup.active_model.selection
    sel.grep(Sketchup::ComponentInstance).each do |s|
        s.set_attribute "dynamic_attributes","aname",

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....


SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Ad Machine 


Return to Dynamic Components

Who is online

Users browsing this forum: No registered users and 6 guests

Visit our sponsors: