SelectSet problem

SelectSet problem

lzs013
Advocate Advocate
519 Views
2 Replies
Message 1 of 3

SelectSet problem

lzs013
Advocate
Advocate

There is a problem with the last statement. How can I solve it? I want to operate on the first part or subassembly in the assembly's selectset.

1.png

0 Likes
Accepted solutions (1)
520 Views
2 Replies
Replies (2)
Message 2 of 3

lzs013
Advocate
Advocate

I want to show the original coordinate system of the selected component.

0 Likes
Message 3 of 3

BrianEkins
Mentor
Mentor
Accepted solution

The problem is the type of object you're setting the current selection to.  The individual parts and subassemblies you see in an assembly are ComponentOccurrence objects, not part or assembly documents.  They reference part or assembly documents, but that's not what's in the assembly.  It's also a ComponentOccurrence object that you can get the position information from.  You use the Transformation property, which returns a matrix that contains the position and orientation information.  There's a method on the Matrix object called GetCoordinateSystem that returns this information in an easier to use format.

 

http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-07042049-4E3C-48E3-8635-27B57353C4E5

 

 

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com