• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

How to get nested attributes?

Scheduled Pinned Locked Moved Plugins
2 Posts 2 Posters 473 Views
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 19 Jan 2010, 17:05

    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 19 Jan 2010, 17:11

      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
      1 / 1
      • First post
        2/2
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement