How to retrieve part (model) file name in Inventor Drawing using VBA code

How to retrieve part (model) file name in Inventor Drawing using VBA code

m.joudivand
Enthusiast Enthusiast
575 Views
2 Replies
Message 1 of 3

How to retrieve part (model) file name in Inventor Drawing using VBA code

m.joudivand
Enthusiast
Enthusiast

Hi everyone,

 

Are you able to let me know how it is possible to get the original part file name (***.ipt) on a drawing file using VBA code?

 

Thanks in advance

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

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

As you can reference different documents to different drawing views, this question can not be answered. If you only reference a single part document, you can retrieve this information in

 

ThisApplication.ActiveDocument.AllReferencedDocuments(1).FullFileName

as long as you have the drawing document open and active.

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
Message 3 of 3

m.joudivand
Enthusiast
Enthusiast

Dear @Ralf_Krieg thank you very much,

the code solved my problem, you are truly professional man, thanks

0 Likes