Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add assembly workplane

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
302 Views, 0 Replies

Add assembly workplane

 

I have been trying to create an assembly wokplane offset from the ZX Plane but it is not working. I think my problem is my inability to add a new plane based on the ZX plane prior to offsetting it?

 

Any help would be welcome.

           

Try


               

Dim oWorkPlane As Inventor.WorkPlane = oOcc.Definition.WorkPlanes.Item("ZX Plane")

               

' Create a proxy for the 1st work plane

               

Dim oWPObj AsObject = Nothing


               

' Create a proxy for the 2nd face

               

Try

                   

Call oOcc.CreateGeometryProxy(oWorkPlane, oWPObj)

               

Catch ex As Exception

                    MsgBox(

"The plane selected is wrong " & ex.Message)

               

EndTry


               

Dim oOccWPProxy1 As Inventor.WorkPlaneProxy = TryCast(oWPObj, WorkPlaneProxy)

               

If oOccWPProxy1 IsNothingThen

                    MsgBox(

"WP Proxy 1 is undefined ")

                   

ReturnFalse

               

EndIf


                oAsmDef.Constraints.AddFlushConstraint(oAsmDef.WorkPlanes(2), oOccWPProxy1, iOffset)

           

Catch ex As Exception

                MsgBox(

"The Plane constraint could not be created: " & ex.Message)

           

EndTry

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report