Assembly analisys in Inventor API

Assembly analisys in Inventor API

Anonymous
Not applicable
402 Views
1 Reply
Message 1 of 2

Assembly analisys in Inventor API

Anonymous
Not applicable

Hello, everyone!
I am interested in the following question. I have a training project. I need to enter data about the parts from the assembly in the database. Then the program should determine if this part is in another assembly. How can I use Inventor API to get data from the assembly that uniquely identifies the part? What data should it be? write a simple code example if possible. I will be glad to any answer. thanks)

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

JaneFan
Autodesk
Autodesk

Hey @Anonymous , 

 

Here is code using inventor API to visit all referenced document of the top assembly. you may need to compare the file name with the one you want to check and see whether it exists in the current top assembly. 

Sub test()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument

Dim osubDoc As Document
For Each osubDoc In oDoc.AllReferencedDocuments
Debug.Print osubDoc.FullFileName
Next
End Sub




Jane Fan
Inventor/Fusion QA Engineer
0 Likes