is it possiable to know a face is used to create a workplane. I am creating an addin to make workplanes on all 6 faces of a rectangular surfacebody (solid) in multibody part. I want to avoid creating plane on faces already used to create a workplane. I am looking something like below.
Dim oPart As PartDocument Set oPart = ThisApplication.ActiveDocument Dim oPartDef As PartComponentDefinition Set oPartDef = oPart.ComponentDefinition Dim oFace As face For Each oFace In oPartDef.SurfaceBodies.Item(1).Faces 'Code to check any plane is created by 'offset this face Next
Solved! Go to Solution.
Solved by saseendrankombath. Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Hi saseendrankombath,
I think you're looking for the WorkPlane.DrivenBy property.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Thanks Curtis, for the guidance
For Each oWorkPlane In oPartCompDef.WorkPlanes If oWorkPlane.DrivenBy.Count <> 0 Then If oWorkPlane.DrivenBy.Item(2) Is oFace Then Createplane = False PlaneCreated = False End If End If Next If Createplane = True Then Set newPlane = oPartCompDef.WorkPlanes.AddByPlaneAndOffset(oFace, 0) Set normal = GetNormal(newPlane) PlaneCreated = True End If End If
My Problem solved with the above code.