- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I try to create small addins for simple sketch creation, but it not works.
new sketch already created but sketch point and circle not works.
below is my script.
your advice, please.
Dim oDoc As PartDocument = g_inventorApplication.ActiveDocument
Dim oCompDef As PartComponentDefinition = oDoc.ComponentDefinition
Dim oTG As TransientGeometry = g_inventorApplication.TransientGeometry
'sketch Plane
Dim oPlaneXY As WorkPlane = oCompDef.WorkPlanes("ARCUCS: XY Plane")
'Create Sketch.
Dim oSketch As PlanarSketch
oSketch = oCompDef.Sketches.Add(oPlaneXY)
oSketch.Name = "ARSketchHoles2"
oSketch.Edit()
Dim xCoord As Double = 15
Dim yCoord As Double = 15
Dim radius As Double = 5
Dim o2DPoint As Point2d = oTG.CreatePoint2d(xCoord, yCoord)
Dim circle As SketchCircle = oSketch.SketchCircles.AddByCenterRadius(o2DPoint, radius)
Solved! Go to Solution.