Inventor Engineer-To-Order (Read-Only)
Welcome to Autodesk’s Inventor ETO Forums. Share your knowledge, ask questions, and explore popular Inventor ETO topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 2
ludesroc
327 Views, 1 Reply

WorkPlane Normal

Hi, 

 

How can I get a part plane's normal in the context of an assembly using the API or ETO?

 

Here's what I've been trying so far...Does Proxies existe in ETO?

 

Method getPlaneNormal (prt As Part, workPlaneName As String) As Vector

Dim ivApp As Any = %%inventorapplication
Dim oDoc As Any = ivApp.ActiveDocument
Dim oCompDef As Any = oDoc.ComponentDefinition

Dim partName As String = prt.DisplayName
Dim oPart As Any = oCompDef.Occurrences.get_itemByName(partName)
Dim oPartCompDef As Any = oPart.Definition
Dim oWorkPlanes As Any = oPartCompDef.WorkPlanes
Dim oWorlPlane As Any = oWorkPlanes.get_item(workPlaneName)

Dim oPlaneNormal As Any = oWorlPlane.Plane.Normal

'Create proxy object
Dim oWPpx As Any 'WorkPlaneProxy
oPart.CreateGeometryProxy(oWP, oWPpx)


Return oPlaneNormal

End Method

 

 

Regards,

Ludesroc
1 REPLY 1
Message 2 of 2
AlexKorzun
in reply to: ludesroc

Hi Ludesroc,

 

We return proxies (where appropriate) for the Intent-controlled entities, including work features, via a call GetHostObject( part)

 

Your code exposes the problem we are not dealing with yet. We are not supporting .Net calls to the methods with byref notation. For illustation only, the C# compiler demands "out" or "ref" keyword like in following example:

 

                    Object wpO;
                    occ.CreateGeometryProxy(wp, out wpP);

One of the workarounds would be to create .Net library to wrap the similar operations.

 

 

 

Thank you,




Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report