Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub CATMain()
CATIA.DisplayFileAlerts = False
Set oDocs = CATIA.Documents
docPath = oDocs.Item(1).Path
changePath = MsgBox("Current save location is: " & docPath & " Would you like to change file path?", vbYesNo)
If changePath = vbYes Then
docPath = InputBox("Enter new file path", "File path")
End If
For x = 1 To oDocs.Count
If TypeName(oDocs.Item(x)) = "ProductDocument" Then
Set oDoc1 = oDocs.Item(x)
Set oProduct1 = oDoc1.Product
oDoc1.SaveAs docPath & "\" & oProduct1.PartNumber & ".CATProduct"
End If
Next 'x
For v = 1 To oDocs.Count
If TypeName(oDocs.Item(v)) = "PartDocument" Then
Set oDoc2 = oDocs.Item(v)
Set oPart1 = oDoc2.Product
oDoc2.SaveAs docPath & "\" & oPart1.PartNumber & ".CATPart"
End If
Next 'v
Msgbox "Save Finished!",,"SAVE FINISH!"
End Sub