Finding associated Drawing Files from a Design

Finding associated Drawing Files from a Design

josh.aeronavics
Participant Participant
412 Views
2 Replies
Message 1 of 3

Finding associated Drawing Files from a Design

josh.aeronavics
Participant
Participant

Hi, I have an assembly and I am trying to check if all of the individual externally linked parts in the assembly have a drawing associated with them. After looking at the documentation and doing some testing I can not work out what the mechanism is that links a drawing to a design and how to use that via the API. I am writing the script in Python.

0 Likes
Accepted solutions (1)
413 Views
2 Replies
Replies (2)
Message 2 of 3

kandennti
Mentor
Mentor
Accepted solution

Hi @josh.aeronavics .

 

The DataFile.parentReferences property contains the Datafile of the related f2d file.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-50503941-32BF-4D11-8248-D3F46096E716 

 

If you change the f3d of a part and need to find all the f3d/f2d files that need to be updated, you can do so by traversing the DataFile.parentReferences property back to the top level.

I took advantage of this and created this add-in.

https://github.com/kantoku-code/Fusion360_GOKOTAI 

1.png

All in Japanese.

Message 3 of 3

josh.aeronavics
Participant
Participant

@kandennti That will work great. It would be ideal if you could get the data file of an external component directly from the component object in the assembly, but going via the dataFile.parentReferences tree is a good alternative.