'Script zum Exportieren von V5-Parts und Produkten in IGES' 'Erstellt von Jens Hansen' 'Dieses Script ist kostenlos verfügbar und darf weder verkauft noch Angeboten werden' 'Adresse zum Download: http://catia.cad.de' Language="VBSCRIPT" Sub CATMain() folderinput = InputBox ("Wo befinden sich Ihre Daten ?","Eingabe","C:\Documents and Settings\k.siebert\Desktop\TEST_STEP\",500,1000) folderoutput = InputBox ("Wohin soll gespeichert werden?","Eingabe","C:\Documents and Settings\k.siebert\Desktop\TEST_STEP\",500,1000) Dim fs, f, f1, fc, s Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(folderinput) Set fc = f.Files For Each f1 in fc Dim PartDocument1 As Document Set documents1 = CATIA.Documents Dim document1 As Document PFADEINGABE = folderinput & f1.name On Error resume next Set PartDocument1 = CATIA.Documents.Open(PFADEINGABE) LoeschEndung = Left(f1, InStrRev(f1, ".CAT") - 1) PFADAUSGABE = LoeschEndung & ".igs" 'PFADAUSGABE = folderoutput & f1.name & ".igs" PartDocument1.ExportData PFADAUSGABE, "igs" If Err then Msgbox "dieses Datei kann nicht exprotiert werden." End if s = s & f1.name s = s & vbCrLf PartDocument1.Close Next 'Bei Bedarf kann eine Schlussnachricht eingeblendet werden, wo die umgewandelten Elemente aufgelistet sind. Hierfür in nachfolgender zeile die Hochkommas entfernen.' MsgBox "Umwandlung von CATProduct + CATPart zu IGS fertig!" & vbCrLf & s ' End Sub