<?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 Re: Rigid joint between an external inserted component and a sketch point fails in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/13149017#M1033</link>
    <description>&lt;P&gt;I don't believe there is a problem with the API here. Here's a slightly modified version of the original program that works. The difference is that I added line 25 so that the point used later is a proxy of the origin point in the other component. This idea of "proxies" is discussed in the &lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-88A4DB43-CFDD-4CFF-B124-7EE67915A07A" target="_blank" rel="noopener"&gt;user manual&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;app = adsk.core.Application.get()
ui  = app.userInterface
des = adsk.fusion.Design.cast(app.activeProduct)
root = adsk.fusion.Component.cast(des.rootComponent)

#Select a face to make sketch on
face = ui.selectEntity("Select a Planar Face", "PlanarFaces").entity

#Make sketch on selected face
sketch = root.sketches.add(face)

#Add a sketch point
points = sketch.sketchPoints
sketchPoint = points.add(adsk.core.Point3D.create(0, 10, 0))

#Find component
exampleComponent = app.data.activeHub.dataProjects.item(0).rootFolder.dataFolders.itemByName("Autodesk Example").dataFiles.item(0)

#Insert Component
instantiate = root.occurrences
instantiateComponent = instantiate.addByInsert(exampleComponent, adsk.core.Matrix3D.create(), True)

#Get origin point
originPoint = instantiateComponent.component.originConstructionPoint
originPoint = originPoint.createForAssemblyContext(instantiateComponent)

#Create joint geometry
jointPointComponent = adsk.fusion.JointGeometry.createByPoint(originPoint)
jointPointSketch = adsk.fusion.JointGeometry.createByPoint(sketchPoint)

#Joint settings
joints = root.joints

joint = joints.createInput(jointPointComponent, jointPointSketch)

#joint.angle = adsk.core.ValueInput.createByString('0 deg')
#joint.offset = adsk.core.ValueInput.createByString('0 mm')
joint.isFlipped = False
joint.setAsRigidJointMotion()

#Create joint
joints.add(joint)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2024 22:10:37 GMT</pubDate>
    <dc:creator>BrianEkins</dc:creator>
    <dc:date>2024-11-13T22:10:37Z</dc:date>
    <item>
      <title>Rigid joint between an external inserted component and a sketch point fails</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/12941821#M1030</link>
      <description>&lt;P&gt;I'm trying to insert an external component and rigid join it to sketch point, but i'm getting this error&lt;/P&gt;&lt;LI-CODE lang="general"&gt;return _fusion.Joints_add(self, input)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 3 : Provided input paths for joint are not valid.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my code.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;app = adsk.core.Application.get()
ui  = app.userInterface
des = adsk.fusion.Design.cast(app.activeProduct)
root = adsk.fusion.Component.cast(des.rootComponent)

#Select a face to make sketch on
face = ui.selectEntity("Select a Planar Face", "PlanarFaces").entity

#Make sketch on selected face
sketch = root.sketches.add(face)

#Add a sketch point
points = sketch.sketchPoints
sketchPoint = points.add(adsk.core.Point3D.create(0, 10, 0))

#Find component
exampleComponent = app.data.activeHub.dataProjects.item(0).rootFolder.dataFolders.itemByName("Autodesk Example").dataFiles.item(0)

#Insert Component
instantiate = root.occurrences
instantiateComponent = instantiate.addByInsert(exampleComponent, adsk.core.Matrix3D.create(), True)

#Get origin point
originComponent = instantiateComponent.component.originConstructionPoint

#Create joint geometry
jointPointComponent = adsk.fusion.JointGeometry.createByPoint(originComponent)
jointPointSketch = adsk.fusion.JointGeometry.createByPoint(sketchPoint)

#Joint settings
joints = root.joints

joint = joints.createInput(jointPointComponent, jointPointSketch)

#joint.angle = adsk.core.ValueInput.createByString('0 deg')
#joint.offset = adsk.core.ValueInput.createByString('0 mm')
joint.isFlipped = False
joint.setAsRigidJointMotion()

#Create joint
joints.add(joint)&lt;/LI-CODE&gt;&lt;P&gt;when i do the same manually it's no problem.&lt;/P&gt;&lt;P&gt;hope someone can help me&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 11:19:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/12941821#M1030</guid>
      <dc:creator>Hyger</dc:creator>
      <dc:date>2024-08-06T11:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rigid joint between an external inserted component and a sketch point fails</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/12943336#M1031</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't make it work as you have it, since I got the same error message everytime a point from the imported component is used to make the joint.&lt;/P&gt;&lt;P&gt;A workaround that worked for me was to import the component as a child of another component, which was created locally.&lt;/P&gt;&lt;P&gt;So the hierarchy looks like the following:&lt;/P&gt;&lt;P&gt;root&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;sketch (with point1)&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;component1&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;importedComponent&lt;/P&gt;&lt;P&gt;Make component1 not grounded to parent (to let it move) and make importedComponent grounded to parent (will move with its parent).&lt;/P&gt;&lt;P&gt;Then make the joint between point1 and component1's&amp;nbsp;originConstructionPoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this can help as a workaround for you, while Fusion Team could investigate a possible bug whit this method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jorge Jaramillo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 02:39:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/12943336#M1031</guid>
      <dc:creator>Jorge_Jaramillo</dc:creator>
      <dc:date>2024-08-07T02:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Rigid joint between an external inserted component and a sketch point fails</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/12943963#M1032</link>
      <description>&lt;P&gt;Thank you! that worked&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although it's kind of a hack, but i'm going to use it until it gets fixed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 09:22:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/12943963#M1032</guid>
      <dc:creator>Hyger</dc:creator>
      <dc:date>2024-08-07T09:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Rigid joint between an external inserted component and a sketch point fails</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/13149017#M1033</link>
      <description>&lt;P&gt;I don't believe there is a problem with the API here. Here's a slightly modified version of the original program that works. The difference is that I added line 25 so that the point used later is a proxy of the origin point in the other component. This idea of "proxies" is discussed in the &lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-88A4DB43-CFDD-4CFF-B124-7EE67915A07A" target="_blank" rel="noopener"&gt;user manual&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;app = adsk.core.Application.get()
ui  = app.userInterface
des = adsk.fusion.Design.cast(app.activeProduct)
root = adsk.fusion.Component.cast(des.rootComponent)

#Select a face to make sketch on
face = ui.selectEntity("Select a Planar Face", "PlanarFaces").entity

#Make sketch on selected face
sketch = root.sketches.add(face)

#Add a sketch point
points = sketch.sketchPoints
sketchPoint = points.add(adsk.core.Point3D.create(0, 10, 0))

#Find component
exampleComponent = app.data.activeHub.dataProjects.item(0).rootFolder.dataFolders.itemByName("Autodesk Example").dataFiles.item(0)

#Insert Component
instantiate = root.occurrences
instantiateComponent = instantiate.addByInsert(exampleComponent, adsk.core.Matrix3D.create(), True)

#Get origin point
originPoint = instantiateComponent.component.originConstructionPoint
originPoint = originPoint.createForAssemblyContext(instantiateComponent)

#Create joint geometry
jointPointComponent = adsk.fusion.JointGeometry.createByPoint(originPoint)
jointPointSketch = adsk.fusion.JointGeometry.createByPoint(sketchPoint)

#Joint settings
joints = root.joints

joint = joints.createInput(jointPointComponent, jointPointSketch)

#joint.angle = adsk.core.ValueInput.createByString('0 deg')
#joint.offset = adsk.core.ValueInput.createByString('0 mm')
joint.isFlipped = False
joint.setAsRigidJointMotion()

#Create joint
joints.add(joint)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 22:10:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/rigid-joint-between-an-external-inserted-component-and-a-sketch/m-p/13149017#M1033</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2024-11-13T22:10:37Z</dc:date>
    </item>
  </channel>
</rss>

