If (ThisDrawing.ModelDocument Is Nothing) Then Return On Error Resume Next modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName) oPath = "C:\temp\" oAIMD_PARTNO = iProperties.Value("Project", "Stock Number") oRevisionNumber = iProperties.Value("Project", "Revision Number") oFilename = oAIMD_PARTNO &"-"& oRevisionNumber If oFilename = "" Then i = MessageBox.Show("Keine Artikelnummer vorhanden.", "Mein iLogic-Dialogfeld", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1) Else oSTEPAddin = ThisApplication.ApplicationAddIns.ItemById("{90AF7F40-0C01-11D5-8E83-0010B541CD80}") oDocument = ThisApplication.ActiveDocument oContext = ThisApplication.TransientObjects.CreateTranslationContext oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism oOptions = ThisApplication.TransientObjects.CreateNameValueMap oDataMedium = ThisApplication.TransientObjects.CreateDataMedium oFolder = oPath 'oFolder = ThisDoc.Path & "\" oExport = oFolder & oFilename ThisDoc.Document.SaveAs(oExport & (".dxf") , True) ThisDoc.Document.SaveAs(oExport & (".pdf") , True) ThisDoc.Document.SaveAs(oExport & (".dwg"), True) 'STEP/X_T Export' 'read model full filename modelFullFileName = ThisDrawing.ModelDocument.FullFileName 'read model name with extension modelName = IO.Path.GetFileName(modelFullFileName) 'open model ThisDoc.Launch(modelFullFileName) modelName = Strings.Left(modelName, modelName.Length - 4) 'Set the destination file name oDataMedium.FileName = oExport & ".stp" 'Publish document oSTEPAddin.SaveCopyAs(ThisApplication.ActiveDocument, oContext, oOptions, oDataMedium) ThisApplication.ActiveDocument.Close MessageBox.Show("Alle Dateien wurden gespeichert", "File Save") End If