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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to determine object is an assembly or part?

Message 1 of 3
150 Views, 2 Replies

How to determine object is an assembly or part?

I execute script but got error like this.

Traceback (most recent call last):
File "C:/Users/admin/Documents/ExportStep/", line 154, in run
AttributeError: 'NoneType' object has no attribute 'name'


it is to because comp is assembly.

so I am going to determine assembly in fusion360.


Message 2 of 3
in reply to: ruban2

Hi @ruban2 .


Without the code you are running and the f3d/f3z files I don't know anything.

I try to provide as much as I can that I can try right away, but you have not provided any.

Message 3 of 3
in reply to: ruban2

Fusion is a bit strange in that it doesn't differentiate between parts and assemblies and you can even create something that acts as both, that's not recommended. 

Fusion has components and you can assume a component is a part or assembly based on its contents. A component can contain bodies and it can contain references to other components. When it just contains bodies it can logically be considered a part. When it just contains references to other components (occurrences) it can be considered an assembly. It's possible to have a component that has both. I would consider this a bad component. If you have a component that has neither you don't know if it's represents an empty assembly or part.

Brian Ekins
Inventor and Fusion 360 API Expert

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