Message 1 of 3
Project edge of a curved surface to 2d Sketch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All, Running into a block on trying to project an edge of a cylinder face to a 2d sketch. I can do this manually by selecting the edge but can't seem to be able to find the method by API. I am able to get the vertical edges but not the horizontal edge. Any help appreciated.
Dim oFace As Face = ThisApplication.CommandManager.Pick _
(SelectionFilterEnum.kPartFaceCylindricalFilter, "Select a face")
Dim oPartDoc As PartDocument = ThisDoc.Document
Dim Set1 As HighlightSet = ThisApplication.ActiveDocument.CreateHighlightSet
Dim oCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition
Dim oSketch As PlanarSketch = oCompDef.Sketches.Add(oCompDef.WorkPlanes(3))
oSketch.Edit
Dim oLine1 As SketchLine = oSketch.AddByProjectingEntity(oFace.Edges(2))
Dim oLine2 As SketchLine = oSketch.AddByProjectingEntity(oFace.Edges(1))
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan
Or if this helped you, please, click (like)
Regards
Alan