''Select a workplane and run this macro ''In a messagebox it will show you the origin of the workplane ''a rebuild is necessary to continue afterwards. ''Macro created by Teun Ham ''Copyright by Inventor Wizard (http://www.inventorwizard.be) ''Use this macro at your own risk. ''You may only copy/modify this or part of the code if you leave this header!Public Sub WorkPlaneCreation() On Error GoTo ErrorHandler1 Dim oDoc As Document Set oDoc = ThisApplication.ActiveDocument Dim oHS As HighlightSet Set oHS = oDoc.HighlightSets.Add oHS.Clear Call oHS.SetColor(0, 255, 0) Dim oWorkPlane As WorkPlane Set oWorkPlane = oDoc.SelectSet.Item(1) On Error Resume Next Dim oWorkPlaneDef As WorkPlaneDefinitionEnum oWorkPlaneDef = oWorkPlane.DefinitionType If Err Then Err.Clear MsgBox "'" & oWorkPlane.Name & "' has been created by a point and tangent face" Call oHS.AddItem(oWorkPlane.Definition.Face) Call oHS.AddItem(oWorkPlane.Definition.Point) Else Select Case oWorkPlane.DefinitionType Case kThreePointsWorkPlane 'Three point work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by three points" Call oHS.AddItem(oWorkPlane.Definition.Point1) Call oHS.AddItem(oWorkPlane.Definition.Point2) Call oHS.AddItem(oWorkPlane.Definition.Point3) Case kTwoLinesWorkPlane 'Two line work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by two lines" Call oHS.AddItem(oWorkPlane.Definition.Line1) Call oHS.AddItem(oWorkPlane.Definition.Line2) Case kLineAndPointWorkPlane 'Line and point work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by a line and a point" Case kPlaneAndPointWorkPlane 'Plane and point work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by a plane and a point" Call oHS.AddItem(oWorkPlane.Definition.Plane) Call oHS.AddItem(oWorkPlane.Definition.Point) Case kLinePlaneAndAngleWorkPlane 'Line, plane, and angle work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by a line, plane and angle" Call oHS.AddItem(oWorkPlane.Definition.Line) Call oHS.AddItem(oWorkPlane.Definition.Plane) Case kPlaneAndOffsetWorkPlane 'Plane and offset work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by a plane and an offset" Call oHS.AddItem(oWorkPlane.Definition.Plane) Case kLineAndTangentWorkPlane 'Line and tangent face work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by a line and a tangent face" Call oHS.AddItem(oWorkPlane.Definition.Face) Call oHS.AddItem(oWorkPlane.Definition.Line) Case kPlaneAndTangentWorkPlane 'Plane and tangent face work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by a plane and a tangent face" Call oHS.AddItem(oWorkPlane.Definition.Face) Call oHS.AddItem(oWorkPlane.Definition.Plane) Case kFixedWorkPlane 'Fixed work plane definition MsgBox "'" & oWorkPlane.Name & "' is a fixed workplane" Call oHS.AddItem(oWorkPlane) Case kNormalToCurveWorkPlane 'Normal to curve work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by a normal to a curve" Call oHS.AddItem(oWorkPlane.Definition.CurveEntity) Call oHS.AddItem(oWorkPlane.Definition.Point) Case kTwoPlanesWorkPlane 'Two planes work plane definition MsgBox "'" & oWorkPlane.Name & "' has been created by two planes" Call oHS.AddItem(oWorkPlane.Definition.Plane1) Call oHS.AddItem(oWorkPlane.Definition.Plane2) Case kAssemblyWorkPlane 'Assembly work plane definition MsgBox "'" & oWorkPlane.Name & "' is an assembly workplane" '' Case kPointAndTangentWorkPlane 'Point and tangent work plane definition '' MsgBox "'" & oWorkPlane.Name & "' has been created by a point and tangent face" '' Call oHS.AddItem(oWorkPlane.Definition.Face) '' Call oHS.AddItem(oWorkPlane.Definition.Point) Case Else MsgBox "Special!" End Select End If On Error GoTo 0 Exit Sub ErrorHandler1: MsgBox "Oops!", vbInformation End Sub