Some way to capture the root component as an occurrence?

Some way to capture the root component as an occurrence?

en9y37
Advocate Advocate
791 Views
2 Replies
Message 1 of 3

Some way to capture the root component as an occurrence?

en9y37
Advocate
Advocate

Hi there!

 

I'd like to create a rigid group that captured the root component and all its children in just one operation. Since the input for adding the rigid group is a collection of occurrences, I should be able to capture the root component as an occurrence, which I'm capable to do via the user interface.

 

Is there any way to this via API or some known walk around? Note that the behaivour I want to get is not the same as if I collect all the occurrences with design.rootComponent.allOcurrences.

 

Thanks in advance!

0 Likes
792 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor

It's not possible to represent the root component as an occurrence. It appears the command allows the root component to be selected, and choosing it results in all the child occurrences being added to the rigid group. The API only expects occurrences and fails if you try to pass in the root component. The end result seems to be the same as using the allOccurrences property, though, so I don't see the need to pass in the root component. I think it's more of a convenience in the UI.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 3

en9y37
Advocate
Advocate

Hi Brian. Thanks for your time.

 

I'll try to explain the small difference.

 

When I make the rigid group in the user interface by selecting manually the root component, the result is the same as via API and rootComponent.allOccurrences, but besides, all the occurrences get joined to the sketches and the bodies placed directly in the root component. This small difference means that at same time all occurrences keeps "grounded" and if for some reason the position of the occurrences depends on some sketch geometry, everything keeps right.

 

This is specially interesting when this design with rigid group is inserted in another design, because this way, the whole design keeps properly, including the bodies placed in the root component.

 

Now, I solve this issue inserting the design and then creating the rigid group for the just inserted occurrence, which means the behaviour I expect. But there are other situations in which the selection of the root component as an occurrence would be needed. For instance for creating as-built joints for an occurrence and the root component itself. This is something similar to ground the occurrence, but again more convenient for later insertions of the design.

0 Likes