Hi, With this rule you can create a work point by selecting 3 planes or three flat faces.
oDef = ThisDoc.Document.ComponentDefinition
Dim face1 As Object
face1 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select Face")
Dim face2 As Object
face2 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select Face")
Dim face3 As Object
face3 = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select Face")
Dim oWPoint As WorkPoint
oWPoint = oDef.WorkPoints.AddByThreePlanes(face1 , face2 , face3)
oWPoint.Name = "My_New_Work_Point"
With this rule you can create a work plane parallel to another plane or face at a certain distance.
oDef = ThisDoc.Document.ComponentDefinition
Distance= 2' Units in mm
Dim face As Object
face = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllPlanarEntities, "Select Face")
Dim oWPlane As WorkPlane
oWPlane = oDef.WorkPlanes.AddByPlaneAndOffset(face, Distance/10)
oWPlane.Name = "New_Work_Plane"
If this answer has served you please mark it as an accepted solution. Thank you . regards
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn