I want to edit an exisitng sketch called "SketchSupportPositions". I have found several examples on how to create a new sketch, but that is not what I need. Can anyone give me an example on how to get my existing sketch?
Solved! Go to Solution.
I want to edit an exisitng sketch called "SketchSupportPositions". I have found several examples on how to create a new sketch, but that is not what I need. Can anyone give me an example on how to get my existing sketch?
Solved! Go to Solution.
Solved by dutt.thakar. Go to Solution.
Try this to reach in edit state of the sketch
Dim oDef As PartComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition Dim oSketch As PlanarSketch = oDef.Sketches("SketchSupportPositions")
oSketch.Edit
To exit the edit state of a sketch
oSketch.ExitEdit
Hope this will be helpful.
Try this to reach in edit state of the sketch
Dim oDef As PartComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition Dim oSketch As PlanarSketch = oDef.Sketches("SketchSupportPositions")
oSketch.Edit
To exit the edit state of a sketch
oSketch.ExitEdit
Hope this will be helpful.
This could help you,
Dim oPartDoc As PartDocument Dim oTG As TransientGeometry Dim oSketch As PlanarSketch oPartDoc = ThisApplication.ActiveDocument oTG = ThisApplication.TransientGeometry oSketch = oPartDoc.ComponentDefinition.Sketches(1) MessageBox.Show(oSketch.Name, "Title") oSketch.Edit
This could help you,
Dim oPartDoc As PartDocument Dim oTG As TransientGeometry Dim oSketch As PlanarSketch oPartDoc = ThisApplication.ActiveDocument oTG = ThisApplication.TransientGeometry oSketch = oPartDoc.ComponentDefinition.Sketches(1) MessageBox.Show(oSketch.Name, "Title") oSketch.Edit
@dutt.thakar wrote:
Try this to reach in edit state of the sketch
Dim oDef As PartComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition Dim oSketch As PlanarSketch = oDef.Sketches("SketchSupportPositions")
oSketch.EditTo exit the edit state of a sketch
oSketch.ExitEditHope this will be helpful.
This works! Thank you.
@dutt.thakar wrote:
Try this to reach in edit state of the sketch
Dim oDef As PartComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition Dim oSketch As PlanarSketch = oDef.Sketches("SketchSupportPositions")
oSketch.EditTo exit the edit state of a sketch
oSketch.ExitEditHope this will be helpful.
This works! Thank you.
Can't find what you're looking for? Ask the community or share your knowledge.