Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All
tried to have an ilogic that can export all model states of my part document to a seperate IPT ot X_T files, but it ended in exporting all the models but didnt chage the model state for each one, so they got different names but with the same current model state.
here is the code:
Dim oDoc As PartDocument = ThisApplication.ActiveDocument Dim oFolderName As String FolderName = InputBox("Insert Folder Name", "Export Folder", oFolderName) Dim oPath As String = "C:\X_T\" & FolderName ' Change this to the correct path For Each oState As ModelState In oDoc.ComponentDefinition.ModelStates Try Dim oXtPath As String = oPath & "\" & oState.Name & ".ipt" oDoc.SaveAs(oXtPath, True) Catch ex As Exception MessageBox.Show("Error processing " & oState.Name & ": " & ex.Message, "iLogic") End Try Next MessageBox.Show("New Files Created in: " & vbLf & oPath, "iLogic")
A help needed!
Thanks
Solved! Go to Solution.