Private Sub UserForm_Initialize() TextBox1.text = "0" TextBox2.text = "0" TextBox3.text = "0" TextBox4.text = "0" TextBox5.text = "0" TextBox6.text = "0" TextBox7.text = "24V (DC)" TextBox8.text = "~3/N/PE, 230/400V, 50Hz" TextBox9.text = "0" End Sub Private Sub CommandButton1_Click() TextBox1.text = Replace(TextBox1.text, ".", ",") TextBox2.text = Replace(TextBox2.text, ".", ",") TextBox3.text = Replace(TextBox3.text, ".", ",") TextBox4.text = Replace(TextBox4.text, ".", ",") TextBox5.text = Replace(TextBox5.text, ".", ",") TextBox6.text = Replace(TextBox6.text, ".", ",") TextBox7.text = Replace(TextBox7.text, ".", ",") TextBox8.text = Replace(TextBox8.text, ".", ",") TextBox9.text = Replace(TextBox9.text, ".", ",") If (IsNumeric(TextBox1.text)) And (IsNumeric(TextBox2.text)) And (IsNumeric(TextBox3.text)) And (IsNumeric(TextBox4.text)) And (IsNumeric(TextBox9.text)) Then Call UserForm6.Hide Else MsgBox "Bitte nur Nummerische Werte eingeben!" Exit Sub End If UserForm6.Hide Dim oApp As Application Set oApp = ThisApplication If oApp.ActiveDocumentType <> kDrawingDocumentObject Then MsgBox "No Drawing", 16, "Error" If oApp.ActiveDocumentType <> kDrawingDocumentObject Then Exit Sub Dim oNewDocument As DrawingDocument Set oNewDocument = ThisApplication.ActiveDocument Dim oDrawDoc As DrawingDocument Set oDrawDoc = ThisApplication.ActiveDocument Dim oSourceDocument As DrawingDocument Dim i As Long Set oDrawDoc = ThisApplication.ActiveDocument On Error Resume Next For i = oDrawDoc.TitleBlockDefinitions.Count To 1 Step -1 oDrawDoc.TitleBlockDefinitions.Item(i).delete Next i For i = oDrawDoc.BorderDefinitions.Count To 1 Step -1 oDrawDoc.BorderDefinitions.Item(i).delete Next i For i = oDrawDoc.SketchedSymbolDefinitions.Count To 1 Step -1 oDrawDoc.SketchedSymbolDefinitions.Item(i).delete Next i On Error GoTo 0 On Error Resume Next Set oSketchedSymbolDef1 = oDrawDoc.SketchedSymbolDefinitions.Item("Layout_Technische_Daten") If Err Then Set oSourceDocument = ThisApplication.Documents.Open(ThisApplication.FileLocations.FileLocationsFilesDir & "\norm.idw") Set oSourceSketchedSymbolDef = oSourceDocument.SketchedSymbolDefinitions.Item("Layout_Technische_Daten") ' Get the new Sketched Symbol definition. Set oNewSketchedSymbolDef = oSourceSketchedSymbolDef.CopyTo(oNewDocument) ThisApplication.ActiveDocument.Close SaveChanges = False End If Dim sPromptStrings(0 To 8) As String sPromptStrings(0) = TextBox1.text sPromptStrings(1) = TextBox2.text sPromptStrings(2) = TextBox3.text sPromptStrings(3) = TextBox4.text sPromptStrings(4) = TextBox5.text sPromptStrings(5) = TextBox6.text sPromptStrings(6) = TextBox7.text sPromptStrings(7) = TextBox8.text sPromptStrings(8) = TextBox9.text 'Insert Symbol on Point Dim oSketchedSymbolDef As SketchedSymbolDefinition Dim oSketch As DrawingSketch Dim oTG As TransientGeometry Set oTG = ThisApplication.TransientGeometry Dim oSheet As Sheet Set oSheet = oDrawDoc.ActiveSheet Dim oActiveSheet As Sheet Set oActiveSheet = oDrawDoc.ActiveSheet Dim oPick As New clsPick Dim oPickPoint As Inventor.Point Set oPickPoint = oPick.Pick Set oSketchedSymbol = oSheet.SketchedSymbols.Add(oDrawDoc.SketchedSymbolDefinitions.Item("Layout_technische_daten"), oTG.CreatePoint2d(oPickPoint.x, oPickPoint.y), 0, 1, sPromptStrings) End Sub