Change File-->Export PDF default filename to include revision iproperty?

Change File-->Export PDF default filename to include revision iproperty?

claudio.ibarra
Advocate Advocate
1,015 Views
8 Replies
Message 1 of 9

Change File-->Export PDF default filename to include revision iproperty?

claudio.ibarra
Advocate
Advocate

When I go to File --> Export PDF, the default filename is the drawing's filename, with .IDW replaced by .PDF. That's great, but I'd like to add the revision to the end of that.

 

So for 123-456.IDW at Rev 1, it defaults to 123-456 R1.pdf. 

 

Is it possible to change the default naming behavior?

0 Likes
Accepted solutions (1)
1,016 Views
8 Replies
Replies (8)
Message 2 of 9

bradeneuropeArthur
Mentor
Mentor
Accepted solution

So for my understanding:

You need when you press Export to Pdf inventor to display:

the 123-456.IDW at Rev 1 Export to  123-456 R1.pdf, right

 

Then use this method in VB.net Add in:

Private WithEvents MyFileUserInputEvents As FileUIEvents
 
        Private Sub MyFileUserInputEvents_OnPopulateFileMetadata(FileMetadataObjects As Inventor.ObjectsEnumerator, Formulae As String, Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles MyFileUserInputEvents.OnPopulateFileMetadata
			
			Dim ActiveMetaData As FileMetadata
            ActiveMetaData = FileMetadataObjects.Item(1)
			
			
			
			oMetaData.FileName = Replace(MetaData.FileName,"." , "R" oDoc.propertyset.item(1).item("Revision Number").Value
			
			

		end sub

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 9

claudio.ibarra
Advocate
Advocate

I don't know how to apply this solution, but I'm willing to accept that it IS a solution. 

0 Likes
Message 4 of 9

bradeneuropeArthur
Mentor
Mentor

can I assist you?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 9

claudio.ibarra
Advocate
Advocate

Yes please.

 

Do I enter that into the VBA Editor in the Options menu on the Tools tab? 

0 Likes
Message 6 of 9

bradeneuropeArthur
Mentor
Mentor

Hi,

 

For Vb.net?

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 9

claudio.ibarra
Advocate
Advocate

I don't know enough to answer, I'm sorry. I don't see VB.Net in the "Add-ins" section in Tools-Options. If I'm sitting in front of vanilla Inventor Professional 2018, I don't know where to add this code. 

0 Likes
Message 8 of 9

bradeneuropeArthur
Mentor
Mentor

Hi,

 

Questions:

  • Are you familiar with coding/programming?

If not the easiest way is to create a i-logic rule that runs on document Close or another event.

 

Please let me know what you prefer:

  • Add-in Vb.net
  • Ilogic code

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 9 of 9

claudio.ibarra
Advocate
Advocate

I've seen iLogic code that I can re-purpose to generate a PDF with the revision in the filename, but I was wondering if it's possible to change the default filename when someone uses File--Export--PDF. 

0 Likes