Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

First joint missing in joints list?

Anonymous

First joint missing in joints list?

Anonymous
Not applicable

Hi, I'm accessing a number of joints, but one is missing from the component's joint list. Perhaps someone will see what I'm doing wrong. Thank you

 

Using the Python Fusion 360 API, I've managed to find the joint list for the component in my assembly, and can enumerate the joint names, but one joint is missing, Rev6.

 

(Pdb) root = design.rootComponent
(Pdb) comp1 = root.occurrences.itemByName('_0006_SA02_Default:1').childOccurrences.itemByName('0006_001_MC01-5_Default:1').component
(Pdb) comp1.name
0006_001_MC01-5_Default (Pdb) [x.name for x in comp1.joints] ['Rev7', 'Rev10', 'Cyl15'] (Pdb)

 

Using ui.selectEntity(...), I can select Rev6, verify its name, verify that I have the same parent as with the previous code, and verify that the parent's joints list is missing Rev6.  

 

(Pdb) j1 = ui.selectEntity('Select joint', 'Joints').entity
(Pdb) j1.name
Rev6
(Pdb) j1.parentComponent.name
0006_001_MC01-5_Default
(Pdb) [x.name for x in j1.parentComponent.joints]
['Rev7', 'Rev10', 'Cyl15']

 

 Selecting a different joint associated with the parent shows the same result.

 

 

(Pdb) j1 = ui.selectEntity('Select joint', 'Joints').entity
(Pdb) j1.name
Rev7
(Pdb) j1.parentComponent.name
0006_001_MC01-5_Default (Pdb) [x.name for x in j1.parentComponent.joints] ['Rev7', 'Rev10', 'Cyl15']

2017-06-05 07_08_04-Clipboard.png

 

 

0 Likes
Reply
Accepted solutions (2)
652 Views
6 Replies
Replies (6)

ekinsb
Alumni
Alumni

Would it be possible to post the assembly here or you can also send it directly to me at brian dot ekins at autodesk dot com.  The behavior does seem strange.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes

Anonymous
Not applicable

Of course. I'm not sure how to post the assembly here, but perhaps this sharing link will work instead? http://a360.co/2rECJqM

And the complete script can be found at http://bit.ly/2qZ90ag

Thank you, Kent

0 Likes

ekinsb
Alumni
Alumni
Accepted solution

I'm able to reproduce the problem using your assembly and have filed a bug. We should be able to look into it soon.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
1 Like

Anonymous
Not applicable

Great, thank you! BTW: I really enjoy your blog

0 Likes

ekinsb
Alumni
Alumni
Accepted solution

I have some good news.  There aren't any problems with the API in this area.  It was a user error for both you and me.  The issue is that there are different kinds of joints.  There is the standard Joint object, the AsBuiltJoint object, and the RigidGroup object.  When you first reported the problem my first thought was that it was an as-built joint but I looked at the joint that was causing the problem in the UI and it appeared to be a standard joint to me.  The UI doesn't do a very good job of differentiating between the two. It refers to both as just "Joints" but when you edit an as-built joint there are less options in the edit dialog.

 

Anyway, in your case the joint that wasn't being returned is actually an as-built joint and most of the joints in your assembly are as-built joints.  To get to them you need to use the AsBuiltJoints collection object instead of the Joints collection.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
1 Like

Anonymous
Not applicable

Wonderful, thank you for finding the solution. I admit, I did notice the various *joint members, but once I found one that seemed to make sense, I stopped investigating. Your note encouraged more investigation, and the members allAsBuiltJoints, allJoints, asBuiltJoints, and joints all appear interesting. With all*Joints if appears I can avoid the traversing the assembly. Allowing one to select the joints through the UI will be better, but small steps while learning, and the coding overhead of UI code is heavy for an example like mine.

 

(Pdb) [x.name for x in part1.component.asBuiltJoints]
['Rev6']

  

(Pdb) [x.name for x in part1.component.joints]
['Rev7', 'Rev10', 'Cyl15']

And after replacing the as built joint with a normal one, all the joints appear in the same list.

 

(Pdb) [x.name for x in part1.component.joints]
['Rev7', 'Rev10', 'Cyl15', 'Rev6']

 

0 Likes