Location Setting: Prompt For Filename

Location Setting: Prompt For Filename

Anonymous
Not applicable
1,484 Views
18 Replies
Message 1 of 19

Location Setting: Prompt For Filename

Anonymous
Not applicable

Hello,

 

I'm trying to figure out where Inventor stores the setting for prompting for a filename when creating a Component with the component generator.

 

I mean this thing here:

 

compgen.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Its not stored in the application options. When I change the setting and restart Inventor, the settings keeps the value so it must be stored somewhere I think...? Is there someone who knows where this setting is saved?

 

thanks in advance

David

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
1,485 Views
18 Replies
Replies (18)
Message 2 of 19

bradeneuropeArthur
Mentor
Mentor
It is stored in the metadata object in 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

Message 3 of 19

Anonymous
Not applicable

Thanks for the quick response.

 

So is there a way I can access this setting with some c# or .net coding and set this setting to true.

 

So that when Inventor starts up this setting is the same for all inventor users?

 

0 Likes
Message 4 of 19

bradeneuropeArthur
Mentor
Mentor
Later I can show you. I am not on my desk right now.
Please send me a private message so I will not forget it!

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 5 of 19

bradeneuropeArthur
Mentor
Mentor
Private WithEvents MyFileUserInputEvents As FileUIEvents

MyFileUserInputEvents = m_inventorApplication.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 oMetaData As FileMetadata

                If FileMetadataObjects.Count > 0 Then
                    For Each oMetaData In FileMetadataObjects
msgbox oMetaData.DisplayName
oMetaData.FileName = "YOUR NAME"
next
end if

end sub

if further help is required let me know.

 

This is a snippet out of a normal add in.

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 6 of 19

Anonymous
Not applicable

Okay,

 

I'm trying to understand the code so that I can implement it into my addin for Inventor.

If i understand it, this will be triggerd if Inventor tries to populate the filemetadata.

 

And then you set the the displayname if de filemetadata to some value...

So in the case of a shaftgenerator you will set the name of the file to "YOUR NAME"...

 

But what I want to do is just check if the combobox "Always prompt for filename" is checked or not. And if not set its value to true..

 

compgen.PNG

I don't want to change the displayname of the shaft i'm about to create.

Or am i seeing this wrong?

 

 

0 Likes
Message 7 of 19

chandra.shekar.g
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

Can you please provide steps to prompt "File Naming" window as below?

 

File_Name.png

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 8 of 19

bradeneuropeArthur
Mentor
Mentor

Filenaming.PNG

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 19

Anonymous
Not applicable

Hello,

 

Here are the steps to get the "File Naming" window:

 

In a Assembly go to the "Design" Tab, you can take almost anything from there: Bolted Conenction, Clevis Pin, Shaft, Spur Gears...

But for this example I used the "Shaft" command. In the dialog you click on the marked Icon. And then you get the "File Naming" window.

 

filename.PNG

 

 

0 Likes
Message 10 of 19

MechMachineMan
Advisor
Advisor

I would think there is almost certainly an xml file kicking around somewhere that you would be able to change to (because it would store the setting there if it was changed from the default)

 

I tried browsing around a little bit, and the closest file I could find was here:

"C:\Program Files\Autodesk\Inventor 2018\Design Accelerator\defaults\CAShaft.Imperial.xml"

 

But in my quick skimming, didn't see anything about a file name. Could be that it actually belongs to a generic xml file for the form, so it would be harder to find.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 11 of 19

Anonymous
Not applicable

Hi,

 

Thanks for the reply. I don't think its in that xml file. Because the setting goes for every design accelerator object. If you change it for the shaft generator it also applies for the bolted connections and so on. So I would think its a generic xml.. But I can seem to locate it.

 

 

0 Likes
Message 12 of 19

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@Anonymous, 

 

"FileName" window settings is saved at "Autodesk.DesignAccelerator.Inventor.addin" which is available at "C:\Users\<user name>\AppData\Roaming\Autodesk\Inventor 2018\Addins\Autodesk.DesignAccelerator.Inventor.addin"

 

It would look like as below.

 

<Settings AutoPopup="0" Height="1,044" Width="1,134" _OVERRIDDEN_="ADDED"/>

 

Please feel free to contact if there is any queries,

 

If solves problem, click on "Accept as solution" / give a "Kudo".

 

Thanks and regards,

 

 


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 13 of 19

Anonymous
Not applicable

Thanks for the solution to this question !!!!

 

BIG KUDOS Smiley Happy

 

 

0 Likes
Message 14 of 19

bradeneuropeArthur
Mentor
Mentor

Question:

 

Would you like to change it via the API too?

 

 

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 15 of 19

Anonymous
Not applicable

Hi,

 

Yeah i would like to change it through the API.

 

I was going to have a go at it tomorrow. But if you already have the answer, I'm very interested?

 

Thanks

0 Likes
Message 16 of 19

bradeneuropeArthur
Mentor
Mentor
I am not on my desk.
Yes Maybe I hsve

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 17 of 19

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

As "Design Accelerator" is a separate Addin, Inventor API does not support "Design Accelerator".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 18 of 19

bradeneuropeArthur
Mentor
Mentor

Hi,

 

I am not completely sure of that.

Is this opinion confirmed by Autodesk.

Can you please show me that it is not supported by Autodesk?

 

I see some possibilities using the FDAddin.dll

But I am not sure is this is going to work, I need to try this.

 

other option is to use Xlm serialization!

 

I will give it a try and I will come back to it ASAP.

 

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 19 of 19

Anonymous
Not applicable

Had a little time to write a piece of code to change to AutoPopup setting:

 

  Private Sub ChangeFileNameSetting()
        Try
            Dim xmlPad As String = $"c:\users\{System.Environment.UserName}\AppData\Roaming\Autodesk\Inventor 2017\Addins\Autodesk.DesignAccelerator.Inventor.addin"

            If System.IO.File.Exists(xmlPad) Then
                Dim invSetting As New XmlDocument()
                invSetting.Load(xmlPad)


                Dim node As XmlNode = invSetting.SelectSingleNode("/Preferences/Software/Autodesk/Inventor/RegistryVersion21.2/DesignAccelerator/Windows/Settings")
                Dim str As String = node.Attributes("AutoPopup").Value

                If str = "0" Then
                    node.Attributes("AutoPopup").Value = "1"
                End If

                invSetting.Save(xmlPad)

            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

    End Sub