iLogic to set filename.

iLogic to set filename.

KobusE
Advocate Advocate
1,215 Views
5 Replies
Message 1 of 6

iLogic to set filename.

KobusE
Advocate
Advocate

Good day,

I have created an iPart that I use to create a part with a number of different parameters, i.e. height, width, angle, number of certain occurences, etc. Its actually a fairly simplistic setup and works well. I have now created a form to drive the variables in a single popup, which also works well.

 

So my next step is to add an entry on the form where I can specify the file name the new part should have. Currently I do a file saveas manually and save the file in the following format - PART - Height x Angle x Width x Number and then place this in an assembly. Most of the variance is in the height and number, angle and width generally do not change very often.

 

Unfortunately I cannot share anything due to NDA restrictions but I think my description should do the trick.

 

However, I cannot find a way to set the filename either as a rule or as an option within the form environment. Can it be done even?

 

I would appreciate any thoughts on this.

 

Regards

Kobus

0 Likes
1,216 Views
5 Replies
Replies (5)
Message 2 of 6

WCrihfield
Mentor
Mentor

Hi @KobusE.  If you want the iPart's file name to be a collection of the iPart's parameter/property values, put together in a custom way, have you considered setting this up within the spreadsheet view of the iPart factory?  In the spreadsheet, select the cell for your iPart member where you want to set-up/store this data, then use something like the CONCAT(), CONCATENATE(), or TEXTJOIN() functions to assemble data from the other cells in that row with your custom formatting text to form the file name you want.  Just a thought.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 6

bradeneuropeArthur
Mentor
Mentor

You could user the PostPrivateEvents in Inventor:

 

 

Dim a As Document = ThisDoc.Document
Dim p As CommandManager = ThisApplication.CommandManager

p.PostPrivateEvent(PrivateEventTypeEnum.kFileNameEvent, "PART - Height x Angle x Width x Number.ipt")

 

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

Message 4 of 6

KobusE
Advocate
Advocate

Thanks for the suggestion, however I still do not see an option where the filename generated would then be used to save the new file.

 

Regards

 

Kobus

0 Likes
Message 5 of 6

KobusE
Advocate
Advocate

Thanks I will try this.

 

Regards

 

Kobus

0 Likes
Message 6 of 6

A.Acheson
Mentor
Mentor

You are correct you cannot create a custom iPart filename containing a custom parameter.

https://forums.autodesk.com/t5/inventor-forum/i-part-use-custom-parameter-as-part-of-member-file-nam...

 

It seems that the excel table does not recalculate in order to produce a new filename based on the custom entries.

 

The alternate is to publish to the content center and this will create the filename based on custom parameters.

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes