Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to get level (position) of component/ assembly from the model tree

1 REPLY 1
Reply
Message 1 of 2
pts.user1
110 Views, 1 Reply

Is there a way to get level (position) of component/ assembly from the model tree

I'm trying to fetch the level of component/ assembly from the model tree. Level in terms of how child-parent relationships are linked. For example, the main or root model (car) is at level 1 and the components used might be parts or sub-assembly are there children (engine) which is at level 1.1. 

So is there any way to get the value as 1 or 1.1 or any other way? 

1 REPLY 1
Message 2 of 2
BrianEkins
in reply to: pts.user1

I'm not exactly sure what you need but you should take a look at this sample.  It traverses the entire assembly and builds an indented list.  It's not numbering them but it easily could.  It is tracking the assembly level so it can indent appropriately. 

 

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-5a4fa3a6-fa21-11e4-b610-f8b156d7cd97

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report