08-24-2022
01:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-24-2022
01:05 PM
Looking at the code I expect this is not an iLogic rule. (But an addin?) Anyway, I guess that your function looks something like this:
Public Sub YourFunction(oOcc As ComponentOccurrence)
Dim oADef As ComponentDefinition = g_inventorApplication.ActiveDocument.ComponentDefinition
Dim oAsmXYPlane As WorkPlane = oADef.WorkPlanes.Item(3) 'Assembly XY Plane
Dim oAsmZAxis As WorkAxis = oADef.WorkAxes.Item(3) 'Assembly Z Axis
Dim oODef As ComponentDefinition = oOcc.Definition
Dim oOccXYPlane As WorkPlane = oODef.WorkPlanes.Item(3) 'Occurrence XY Plane
Dim oOccZAxis As WorkAxis = oODef.WorkAxes.Item(3) 'Occurrence Z Axis
oOcc.CreateGeometryProxy(oOccXYPlane, oOccXYPlane)
oOcc.CreateGeometryProxy(oOccZAxis, oOccZAxis)
End Sub
What I understand from the Microsoft link that you send is that your function is not defined correctly.
Did you try using the keywords ByVal or ByRef? Something like this:
Public Sub YourFunction(ByVal oOcc As ComponentOccurrence)
or
Public Sub YourFunction(ByRef oOcc As ComponentOccurrence)
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com