Using the below method creates the work point as a separate entity in the browser. How do i get it to behave like it would if i had done this natively through the GUI?
I want it to consume the X axis and the workplane.
(in case anyone is searching for: creating a work point from axis and work plane)
Dim oWorkPlane As WorkPlane Set oWorkPlane = oPartDoc.ComponentDefinition.WorkPlanes.AddByPlaneAndOffset(oPartDoc.ComponentDefinition.WorkPlanes("YZ Plane"), 60) '60 would change to input parameter 'Create a Work Point at intersection of X Axis and new Work Plane Dim oWorkPoint As WorkPoint Set oWorkPoint = oPartDoc.ComponentDefinition.WorkPoints.AddByCurveAndEntity(oPartDoc.ComponentDefinition.WorkAxes("X Axis"), oWorkPlane)
Solved! Go to Solution.
Solved by nmunro. Go to Solution.
The following should work (add to the end of your code):
oWorkPoint.ConsumeInputs = True
But there seems to be a bug that doesn't enable all inputs to be consumed. I worked around this by doing the following instead:
oWorkPoint.ConsumeInputs = True oWorkPoint.ConsumeInputs = False oWorkPoint.ConsumeInputs = True
Thanks i will give it a try tomorrow when im back in front of the computer.
I see the bug you describe and your workaround works. I'll live with it for now so i can move forward. Thanks