sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    ID - Definition Name

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 283 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      goga63
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

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

        TIG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement