<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic linked component, joints.add raises - RuntimeError: 2 : InternalValidationError in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/linked-component-joints-add-raises-runtimeerror-2/m-p/8599868#M14619</link>
    <description>&lt;P&gt;I am doing the following to create this exception in the API.&amp;nbsp; Performing in the UI it works just fine.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Initially I have a project which contains a linked component.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;create a copy of the linked component&lt;/LI&gt;
&lt;LI&gt;create a new component to contain a target sketch&lt;/LI&gt;
&lt;LI&gt;create the target sketch in this new component for a target profile&lt;/LI&gt;
&lt;LI&gt;create the jointInput with something like this..&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;geo0 = adsk.fusion.JointGeometry.createByPlanarFace(sourceFace&lt;SPAN&gt;, &lt;/SPAN&gt;sourceEdge&lt;SPAN&gt;, &lt;/SPAN&gt;adsk.fusion.JointKeyPointTypes.CenterKeyPoint)&lt;BR /&gt;geo1 = adsk.fusion.JointGeometry.createByProfile(targetProf&lt;SPAN&gt;, None, &lt;/SPAN&gt;adsk.fusion.JointKeyPointTypes.CenterKeyPoint)&lt;/PRE&gt;
&lt;PRE&gt;joints = sourceComponent.joints&lt;BR /&gt;jointInput = joints.createInput(geo0&lt;SPAN&gt;, &lt;/SPAN&gt;geo1)&lt;BR /&gt;jointInput.setAsPlanarJointMotion(adsk.fusion.JointDirections.ZAxisJointDirection)&lt;BR /&gt;jointInput.isFlipped = &lt;SPAN&gt;True&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The joints.add will throw the following exception.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    return _fusion.Joints_add(self, *args)&lt;BR /&gt;RuntimeError: 2 : InternalValidationError : Xl::Utils::findObjectPath(entityOne_.get(), objPath)&lt;/PRE&gt;
&lt;P&gt;This of course works fine for non linked components.&amp;nbsp; &amp;nbsp;I've always had this problem with linked components and have worked around it by copying the body into a new component.&amp;nbsp; Not ideal.&amp;nbsp; &amp;nbsp;Since this works fine in the UI I would expect that it should work in the API as well.&amp;nbsp; &amp;nbsp;Various types of jointInput gets the same results.&amp;nbsp; &amp;nbsp;I would supply an example script but it is very simple to created.&amp;nbsp; You just need one linked component and a target sketch.&lt;/P&gt;
&lt;P&gt;Thanks in advance for help and suggestions.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Feb 2019 03:50:58 GMT</pubDate>
    <dc:creator>balunist</dc:creator>
    <dc:date>2019-02-16T03:50:58Z</dc:date>
    <item>
      <title>linked component, joints.add raises - RuntimeError: 2 : InternalValidationError</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/linked-component-joints-add-raises-runtimeerror-2/m-p/8599868#M14619</link>
      <description>&lt;P&gt;I am doing the following to create this exception in the API.&amp;nbsp; Performing in the UI it works just fine.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Initially I have a project which contains a linked component.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;create a copy of the linked component&lt;/LI&gt;
&lt;LI&gt;create a new component to contain a target sketch&lt;/LI&gt;
&lt;LI&gt;create the target sketch in this new component for a target profile&lt;/LI&gt;
&lt;LI&gt;create the jointInput with something like this..&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;geo0 = adsk.fusion.JointGeometry.createByPlanarFace(sourceFace&lt;SPAN&gt;, &lt;/SPAN&gt;sourceEdge&lt;SPAN&gt;, &lt;/SPAN&gt;adsk.fusion.JointKeyPointTypes.CenterKeyPoint)&lt;BR /&gt;geo1 = adsk.fusion.JointGeometry.createByProfile(targetProf&lt;SPAN&gt;, None, &lt;/SPAN&gt;adsk.fusion.JointKeyPointTypes.CenterKeyPoint)&lt;/PRE&gt;
&lt;PRE&gt;joints = sourceComponent.joints&lt;BR /&gt;jointInput = joints.createInput(geo0&lt;SPAN&gt;, &lt;/SPAN&gt;geo1)&lt;BR /&gt;jointInput.setAsPlanarJointMotion(adsk.fusion.JointDirections.ZAxisJointDirection)&lt;BR /&gt;jointInput.isFlipped = &lt;SPAN&gt;True&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The joints.add will throw the following exception.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    return _fusion.Joints_add(self, *args)&lt;BR /&gt;RuntimeError: 2 : InternalValidationError : Xl::Utils::findObjectPath(entityOne_.get(), objPath)&lt;/PRE&gt;
&lt;P&gt;This of course works fine for non linked components.&amp;nbsp; &amp;nbsp;I've always had this problem with linked components and have worked around it by copying the body into a new component.&amp;nbsp; Not ideal.&amp;nbsp; &amp;nbsp;Since this works fine in the UI I would expect that it should work in the API as well.&amp;nbsp; &amp;nbsp;Various types of jointInput gets the same results.&amp;nbsp; &amp;nbsp;I would supply an example script but it is very simple to created.&amp;nbsp; You just need one linked component and a target sketch.&lt;/P&gt;
&lt;P&gt;Thanks in advance for help and suggestions.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Feb 2019 03:50:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/linked-component-joints-add-raises-runtimeerror-2/m-p/8599868#M14619</guid>
      <dc:creator>balunist</dc:creator>
      <dc:date>2019-02-16T03:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: linked component, joints.add raises - RuntimeError: 2 : InternalValidationEr</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/linked-component-joints-add-raises-runtimeerror-2/m-p/8621064#M14620</link>
      <description>&lt;P&gt;I tried this but unable to reproduced it. It would be easy for me in case you can share a sample script. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 06:45:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/linked-component-joints-add-raises-runtimeerror-2/m-p/8621064#M14620</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2019-02-26T06:45:10Z</dc:date>
    </item>
  </channel>
</rss>

