Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Full Part Number Property in a "Bill of Materials" VBA macro

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
isocam
301 Views, 2 Replies

Full Part Number Property in a "Bill of Materials" VBA macro

Can anybody help???

 

I have the following lines of code in an Inventor VBA module....

 

Set oPartNumberProperty = oCompDef.Document.PropertySets.Item("Design Tracking Properties").Item("Part Number")


PartNumber = Trim(oPartNumberProperty.Value)

 

This will give me the part number!

 

How can I get the path to that part number?

 

For example,

 

If the part number is FRED

 

how can I get the directory where this part exists?

 

eg C:\Test Folder\Test File\FRED.IPT [FOR EAMPLE ONLY!!!}

 

Many thanks in advance!!!!

2 REPLIES 2
Message 2 of 3
Curtis_Waguespack
in reply to: isocam

Hi isocam,

 

Just to clarify, I assume your Part Number iProperty and your File Name are the same, but keep in mind that when you are accessing the iProperty value it knows nothing of the filename and path.

 

I think you're looking for the FullFileName property.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 3 of 3
denis.bourasseau
in reply to: isocam

ThisApplication.ActiveDocument.FullFileName

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report