- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I could use some advice concerning the changing of part names when placed in an assembly.
What I have so far is a form that appears when a prototype part is placed into an assembly Using Inventors place command (image 1)
When the rename button is selected the "save as" screen appears already set to the project folder the part is being added to so I can enter the appropriate name. (image 2)
This all works fine except that the name in the model tree is not changing even though it has been changed in iProperties and in the project folder (image 3)
Our designers want the name in the model tree to match the panel name to avoid confusion when checking the BOM, Any ideas?
I am doing this with a rule linked to a form that is set to activate when the panel is placed into a assembly. Here is the rule I am currently using.
Code Snippet
'define the active document oDoc = ThisDoc.Document 'create a file dialog box Dim oFileDlg As inventor.FileDialog = Nothing InventorVb.Application.CreateFileDialog(oFileDlg) 'set Part type oFileDlg.Filter = "Autodesk Inventor Part Files (*.ipt)|*.ipt" 'set the directory to open the dialog at oFileDlg.InitialDirectory = ThisDoc.WorkspacePath() 'set the file name string to use in the input box oFileDlg.FileName = iProperties.Value("Project", "Part Number") 'work with an error created by the user backing out of the save oFileDlg.CancelError = True On Error Resume Next 'specify the file dialog as a save dialog (rather than a open dialog) oFileDlg.ShowSave() 'catch an empty string in the imput If Err.Number <> 0 Then MessageBox.Show("No File Saved.", "iLogic: Dialog Canceled") ElseIf oFileDlg.FileName <> "" Then MyFile = oFileDlg.FileName 'save the file oDoc.SaveAs(MyFile, False) 'True = Save As Copy & False = Save As End If
I
Solved! Go to Solution.