sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    How to get nested attributes?

    Scheduled Pinned Locked Moved Plugins
    2 Posts 2 Posters 485 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