Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
i would like a way to make a copy of my assem via ilogic and then change the .BOM.SetPartNumberMergeSettings(false) in that copy and save it back. the change must be made in the copy and not in the assem by turning this parameter off before saving and turning him back on after saving.
i have the save part already.
tnx,
Try iLogicVb.RunRule("update view rep drawing") Dim oAsmCompDef As AssemblyComponentDefinition oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition Dim oDoc As Inventor.Document = ThisApplication.ActiveDocument Dim FName As String = oDoc.FullFileName Dim FNP As Integer = InStrRev(FName, "\", -1) Dim oPath As String = Left(FName, FNP) 'Dim oNewName As String = InputBox("Enter New File Name", "Save as", "Name") Dim oNewName As String = "samenstelling_voor_partslist" ' If the user closes the input box, then stop the function If oNewName = vbNullString Then Exit Sub Dim oType As String Select Case oDoc.DocumentType Case kPartDocumentObject: oType = ".ipt" Case kAssemblyDocumentObject: oType = ".iam" Case kDrawingDocumentObject: oType = ".idw" End Select oDoc.SaveAs(oPath & oNewName & oType, True) iLogicVb.UpdateWhenDone = True Catch end try
Solved! Go to Solution.