I use AddByNormalToCurve metod to create a work plane in a sketch 3D.
Is it possible to make new workplane object to be consumed by the parent Sketch3D (Workplane.Consumed = True) as it is possible in UI in Edit mode ?
Thanks in advance
ALink
My sample code in IV 2008:
Public Sub WorkPlane_Test()
'reference to the transient geometry
Dim oTG As TransientGeometry
Set oTG = ThisApplication.TransientGeometry
'reference to the component definition
Dim oCompDef As PartComponentDefinition
Set oCompDef = GetSelectedPartComponent(ThisApplication.ActiveDocument)
'reference to the Sketch3D
Dim oSketch3d As Sketch3D
Set oSketch3d = oCompDef.Sketches3D.Add
'Create a 3D sketch line
Dim oLine3d As SketchLine3D
Set oLine3d = oSketch3d.SketchLines3D.AddByTwoPoints( _
oTG.CreatePoint(0.5, 0.5, 0), oTG.CreatePoint(1, 2, 3))
'Create a work plane at the start point of the line
Dim WPlane As WorkPlane
Set WPlane = oCompDef.WorkPlanes.AddByNormalToCurve( _
oLine3d, _
oLine3d.StartSketchPoint, _
False)
MsgBox WPlane.Consumed
End Sub