Using API is there a way to add a WorkPoint where an Axis and a Part Face Intersect?
I need this to be able to create a WorkPlane normal to the surface of the part at that location.
Solved! Go to Solution.
Solved by ekinsb. Go to Solution.
Hi,
I created a blog for your question:
I think that will give me a good starting point, but I need that point tied to the axis and face. There has to be something out, because through the UI I with the point command select the axis and part surface to create the point needed to then place my workplane. I quickly did the example in your blog and when I move the axis the work plance does not follow, maybe there is something I am missing.
When I get more time I will play around with it again. Thank you for helping me out. You have given me a few more idea.
I think this might be what you're looking for. The other code does the calculation but it doesn't create the point in a way that it's associated to the geometry.
Public Sub AddWorkPointAtIntersection() Dim fc As face Set fc = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Select a face.") Dim axis As WorkAxis Set axis = ThisApplication.CommandManager.Pick(kWorkAxisFilter, "Select a work axis.") Dim partDef As PartComponentDefinition Set partDef = axis.Parent Dim wp As WorkPoint Set wp = partDef.WorkPoints.AddByCurveAndEntity(axis, fc) End Sub
Wonderful!!!
That is exactly what I would looking for. I look in the API help for while. I am sure I just glanced over it. Or misundertood the objective of the method.
Thanks again guys!