linked component, joints.add raises - RuntimeError: 2 : InternalValidationError

linked component, joints.add raises - RuntimeError: 2 : InternalValidationError

balunist
Advocate Advocate
546 Views
1 Reply
Message 1 of 2

linked component, joints.add raises - RuntimeError: 2 : InternalValidationError

balunist
Advocate
Advocate

I am doing the following to create this exception in the API.  Performing in the UI it works just fine.  

 

Initially I have a project which contains a linked component.

  • create a copy of the linked component
  • create a new component to contain a target sketch
  • create the target sketch in this new component for a target profile
  • create the jointInput with something like this..
geo0 = adsk.fusion.JointGeometry.createByPlanarFace(sourceFace, sourceEdge, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)
geo1 = adsk.fusion.JointGeometry.createByProfile(targetProf, None, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)
joints = sourceComponent.joints
jointInput = joints.createInput(geo0, geo1)
jointInput.setAsPlanarJointMotion(adsk.fusion.JointDirections.ZAxisJointDirection)
jointInput.isFlipped = True

 The joints.add will throw the following exception.   

    return _fusion.Joints_add(self, *args)
RuntimeError: 2 : InternalValidationError : Xl::Utils::findObjectPath(entityOne_.get(), objPath)

This of course works fine for non linked components.   I've always had this problem with linked components and have worked around it by copying the body into a new component.  Not ideal.   Since this works fine in the UI I would expect that it should work in the API as well.   Various types of jointInput gets the same results.   I would supply an example script but it is very simple to created.  You just need one linked component and a target sketch.

Thanks in advance for help and suggestions.

0 Likes
547 Views
1 Reply
Reply (1)
Message 2 of 2

goyals
Autodesk
Autodesk

I tried this but unable to reproduced it. It would be easy for me in case you can share a sample script. Thanks



Shyam Goyal
Sr. Software Dev. Manager
0 Likes