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

    How to get nested attributes?

    Scheduled Pinned Locked Moved Plugins
    2 Posts 2 Posters 473 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.
    • J Offline
      jfsketch
      last edited by

      I have a dynamic component that has many layers of nested components. After I select the most parent component I'm trying to write a script that will work through the levels and get the attributes of the nested components. I can't figure out how to reference to the nested ENTITY's from the selected ENTITY.

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Instances do not have their own entities - it uses the entities of its definition, so..

        ins = Sketchup.active_model.selection[0]
        entities = ins.definition.entities 
        

        will give you the entities collection for the instance.

        Hi

        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