ID - Definition Name
-
Good day !
If there is a list of the ID of the Components or Groups in the Model, is there a possibility to get the list Definition Name (Name, Dynamic Name) in the form :
ID - Definition Name
ID - Definition Name
....
ID - Definition Name -
You are asking about several different things...
model = Sketchup.active_model defns = model.definitions### the definitions in the model - components/groups/images
p defns[0].methods.sort### for list of a definition's available methods - also see API guide http://www.sketchup.com/intl/en/developer/docs/classes.php
defns.each{|d| p d.name ### name of defn p d.instances[0].name if d.group? ### name if it's a group p d.get_attribute("dynamic_attributes", "_name", "???") ### if DC 'name' or '???' if not. p d.guid ### the unique GUID for the definition - Note: this only enduring across sessions in newer SketchUp version. }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement