- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I would like to insert the sketch symbol using ilogic on the center of gravity
but I don't understand where the error is
Pt = iProperties.CenterOfGravity
centerPt = iProperties.CenterOfGravity
'CBWeightCG = centerPt.y
'CBWeightCG = centerPt.x
cx = pt.X
cy = pt.Y
cz = pt.Z
Dim oDrawDoc As DrawingDocument = ThisDrawing.Document
' Obtain a reference to the desired sketched symbol definition.
Dim oSketchedSymbolDef As SketchedSymbolDefinition _
= oDrawDoc.SketchedSymbolDefinitions.Item("baricentro")
Dim oSheet As Sheet = oDrawDoc.ActiveSheet
'create insertion point, coordinates - in cm !
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
''questa funziona--- this in ok
'Dim oInsertionPoint As Point2d = oTG.CreatePoint2d(10, 10)
Dim oPosition As Point2d : oPosition = iProperties.CenterOfGravity
oPosition.Y = pt.Y
oPosition.X = pt.X
Dim oInsertionPoint As Point2d = oTG.Type(centerPt)
Dim oSketchedSymbol As SketchedSymbol _
= oSheet.SketchedSymbols.Add( _
oSketchedSymbolDef, _
oInsertionPoint, _
0, 1, Nothing)
Solved! Go to Solution.