Code:
Language="VBSCRIPT"Sub CATMain()
Dim partDocument,filename,verz,box
CATIA.RefreshDisplay = False
Set partDocument = CATIA.ActiveDocument
'Box = MsgBox("partDocument = " & partDocument.name) 'so heisst das Catia-file
Set product = partDocument.GetItem(PartFeature)
'Box = MsgBox("product = " & product.name) 'so heisst das Part
If product.DescriptionRef <> "" then
'Box = MsgBox ("Beschreibung lautet: " & product.DescriptionRef & "und wird nun gelöscht!")
product.DescriptionRef = "" 'trage keine leerzeichen ein - Bug auf Unix-systemen
End If
filename = Mid(partDocument.name,1,Len(partDocument.name)-8) 'Name des aktiven Part-files ohne .CATPart
verz="\BCATIA.THARMEN.MP01.WS/" 'hier eigenes Wunschverzeichnis eintragen
Box = MsgBox ("speichere das V5-Part nun als V4 model ab unter " & verz & filename & ".model", 64, "Info - speichern")
partDocument.ExportData verz & filename & ".model", "model"
Box = MsgBox ("fertig ;-)", 64, "Ende")
end sub