Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
I am useing this code:
And adjusted it a bit:
Sub Main()
Dim oDoc As Document = ThisDoc.Document
If oDoc.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("Active document is not a drawing")
Exit Sub
End If
Dim oDrawDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Sheet = oDrawDoc.ActiveSheet
Dim oSketchedSymbolDef As SketchedSymbolDefinitions = oDrawDoc.SketchedSymbolDefinitions.Item("Sheet Metal DXF-/STEP-file")
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oInsertionPoint As Point2d = oTG.CreatePoint2d(oSheet.Border.RangeBox.MaxPoint.X, oSheet.Border.RangeBox.Y)
Dim oSketchedSymbol As SketchedSymbol = oSheet.SketchedSymbols.Add(oSketchedSymbolDef,oInsertionPoint, 0.0, 1.0, Nothing)
End Sub
But I get the following error on rule 11.
The symbol is there.
What am I doing wrong?
Ciao
Solved! Go to Solution.