09-23-2019
02:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-23-2019
02:36 PM
I was afraid there is no easy way for this. I actually don't understand using vectors in inventor and translating from 3dmodel space to 2d sketch space,I always get some kind an error.@JamieVJohnson2 can i trouble you to finish this code with the method you explained in the reply if it is not too much trouble?????
Dim partDoc As PartDocument partDoc = ThisApplication.ActiveDocument Dim partDef As Inventor.PartComponentDefinition partDef = partDoc.ComponentDefinition 'set a reference to the transient geometry collection. Dim oTransGeom As TransientGeometry oTransGeom = ThisApplication.TransientGeometry ' Create a new sketch. Dim oSketch As PlanarSketch oSketch = partDef.Sketches.Add(partDef.WorkPlanes.Item(1), False) oSketch.Edit Dim oOriginSketchPoint As SketchPoint = oSketch.AddByProjectingEntity(partDef.WorkPoints.Item(1)) oline = oSketch.SketchLines.AddByTwoPoints(oOriginSketchPoint, ThisApplication.TransientGeometry.CreatePoint2d(- 100, - 100))