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

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

isocam
Collaborator Collaborator
448 Views
2 Replies
Message 1 of 3

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

isocam
Collaborator
Collaborator

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!!!!

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

Curtis_Waguespack
Consultant
Consultant
Accepted solution

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

EESignature

0 Likes
Message 3 of 3

Anonymous
Not applicable

ThisApplication.ActiveDocument.FullFileName

0 Likes