Message 1 of 2
linked component, joints.add raises - RuntimeError: 2 : InternalValidationError
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.