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

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

pts_user1
Participant Participant
338 Views
1 Reply
Message 1 of 2

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

pts_user1
Participant
Participant

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? 

0 Likes
339 Views
1 Reply
Reply (1)
Message 2 of 2

BrianEkins
Mentor
Mentor

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
0 Likes