Hallo Thomas,
in der API-Hilfe von Inventor ist das folgende Beispiel.
Public Sub InsertSketchedSymbolOnSheet()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
' Obtain a reference to the desired sketched symbol definition.
Dim oSketchedSymbolDef As SketchedSymbolDefinition
Set oSketchedSymbolDef = oDrawDoc.SketchedSymbolDefinitions.Item("Circular Callout")
Dim oSheet As Sheet
Set oSheet = oDrawDoc.ActiveSheet
' This sketched symbol definition contains one prompted string input. An array
' must be input that contains the strings for the prompted strings.
Dim sPromptStrings(0) As String
sPromptStrings(0) = "A"
Dim oTG As TransientGeometry
Set oTG = ThisApplication.TransientGeometry
' Add an instance of the sketched symbol definition to the sheet.
' Rotate the instance by 45 degrees and scale by .75 when adding.
' The symbol will be inserted at (0,0) on the sheet. Since the
' start point of the line was marked as the insertion point, the
' start point should end up at (0,0).
Dim oSketchedSymbol As SketchedSymbol
Set oSketchedSymbol = oSheet.SketchedSymbols.Add(oSketchedSymbolDef, oTG.CreatePoint2d(0, 0), (3.14159 / 4), 0.75, sPromptStrings)
End Sub
Gruß
Marco
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP