Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am having trouble flipping a plane, I believe I've done this before simply by adding "oWorkPlane.FlipNormal = True" to the code but I'm getting an "Expression is a value and therefore cannot be the target of an assignment" error. Doing a bit of digging and not finding much to help me figure this out, best I've found is here.
Here's a snippet of what I've been experimenting with, I've REM'med out attempts I've made that have failed:
'DXF plane manager PlaneFound = False For Each oWorkPlane In oCompDef.WorkPlanes If oWorkPlane.Name = "DXF Plane" Then PlaneFound = True Next oFace = iLogicVb.Automation.GetNamedEntities(ThisDoc.Document).TryGetEntity("Flat " & CStr(StartFlat)) If PlaneFound Then 'If plane exists, then ensure placement oCompDef.WorkPlanes.Item("DXF Plane").SetByPlaneAndOffset(oFace, 0) 'oCompDef.WorkPlanes.Item("DXF Plane").FlipNormal.SetByPlaneAndOffset(oFace, 0) 'fails oCompDef.WorkPlanes.Item("DXF Plane").Grounded = True oCompDef.WorkPlanes.Item("DXF Plane").AutoResize = False oCompDef.WorkPlanes.Item("DXF Plane").Visible = False 'Call WorkPlane.FlipNormal("DXF Plane", "X") 'fails 'oCompDef.WorkPlanes.Item("DXF Plane").FlipNormal() 'fails 'oCompDef.WorkPlanes.Item("DXF Plane").FlipNormal = True 'fails Else 'Else create the plane oWorkPlane = oCompDef.WorkPlanes.AddByPlaneAndOffset(oFace, 0, False) oWorkPlane.Name = "DXF Plane" oWorkPlane.Visible = False oWorkPlane.AutoResize = False oWorkPlane.Grounded = True End If
The plane is created atop a desired "face", anyone know the correct syntax to reach my desire of flipping this plane?
Autodesk Inventor Certified Professional

Solved! Go to Solution.