How to not transfer stock number iproperty of the current document to new document after it is saved as

How to not transfer stock number iproperty of the current document to new document after it is saved as

Anonymous
Not applicable
199 Views
1 Reply
Message 1 of 2

How to not transfer stock number iproperty of the current document to new document after it is saved as

Anonymous
Not applicable

When I save as a document which has a stock number in its iproperties, the new document has also the same stock number with the other document. Is it possible to make stock number field empty in the new document automatically when it is saved as from another document? In other words, when I save as a part or assembly file I dont want have the same stock number of the previous file.

Because I want to use unique stock numbers.

 

Thanks for your help.

0 Likes
200 Views
1 Reply
Reply (1)
Message 2 of 2

JelteDeJong
Mentor
Mentor

The best thing i can think of is creating a external iLogic rule that does the saving and cleaning up the stock number. something like this.

Dim orgName = ThisDoc.Document.FullFileName

Dim saveFileDialog As FileDialog = Nothing
ThisApplication.CreateFileDialog(saveFileDialog)
saveFileDialog.FileName = orgName
saveFileDialog.Filter = "Inventor Part Files (*.ipt)|*.ipt"
saveFileDialog.ShowSave()

Dim newName = saveFileDialog.FileName
If (String.IsNullOrEmpty(newName)) Then Return
If (orgName.Equals(newName) = False) Then
    iProperties.Value("Project", "Stock Number") = ""
End If

But you will need to use this rule to "save as" a part instead of the normal buttons. If you want to have a button that triggers this external rule you could use the addon "ButtonConstructor".

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes