Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody
with help I create the following code to create a sketch on the xy-plane
'Set a reference to the part dokument Dim oDoc As Inventor.Document oDoc = ThisDoc.Document ' Set a reference to the component definition. Dim oCompDef As PartComponentDefinition oCompDef = oDoc.ComponentDefinition ' Create a new sketch on the X-y work plane. Dim oSketch As PlanarSketch oSketch = oCompDef.Sketches.Add(oCompDef.WorkPlanes(3)) oSketch.Edit 'project origin point Dim oOriginSketchPoint As SketchPoint oOriginSketchPoint = oSketch.AddByProjectingEntity(oCompDef.WorkPoints.Item(1))
It work perfect and reduce the clicks a little bit.
The last thing to make it very perfect is to change the view normal to the sketchplane. Like it is in the sketch command
I think i must change the camara eye but I'm a beginner in programming so I hope someone of the cracks can help me.
Thanks and greetz

Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault
Solved! Go to Solution.