<?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: Minimal working example of creating a Sweep with a Guide Surface through the Python API in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14007918#M22577</link>
    <description>&lt;P&gt;I think the problem is that you are passing in a Body.&amp;nbsp; Instead, what appears to be needed is an array of BRepFace.&amp;nbsp; This is consistent with the UI - guide surface is a face selection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7741B8F2-D2EF-4C3C-A719-7BB4A25F1A4F" target="_blank" rel="noopener"&gt;SweepFeatureInput.guideSurfaces Property&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-02-06 at 10.52.27 AM.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1616868i52ACCDABEE1BB94A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-02-06 at 10.52.27 AM.png" alt="Screenshot 2026-02-06 at 10.52.27 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2026 18:53:42 GMT</pubDate>
    <dc:creator>jeff_strater</dc:creator>
    <dc:date>2026-02-06T18:53:42Z</dc:date>
    <item>
      <title>Minimal working example of creating a Sweep with a Guide Surface through the Python API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14007349#M22575</link>
      <description>&lt;P&gt;I'm trying to create a Sweep programatically. I can't make sense of the docs - partly due to the split between python and C++ and the difficulty of debugging, but also partly as it's a bit confusing. The code is in flux at the moment, but it's roughly along the lines of:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;# This works fine, it's making a Surface Loft, shows up orange in the timeline
loft_body = loft_feats.add(loft_input) 
... 
sweep_input = sweeps.createInput(profile, path, op)
sweep_input.guideSurfaces = loft_body.bodies.item(0)
sweep_input.distanceOne = 1.0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run it, it's a C++ type error on line 5 (which I can't copy paste from the dialog &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What *should* I be passing in? And more generally, how should I figure it out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a side note - how do I get access to the errors and output logs of Scripts? The online docs (&lt;A href="https://help.autodesk.com/view/PLM/ENU/?guid=DEV-ERROR-TRACKING" target="_blank"&gt;https://help.autodesk.com/view/PLM/ENU/?guid=DEV-ERROR-TRACKING&lt;/A&gt;) say there should be a yellow warning icon next to the script, but that doesn't match the current UI&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 12:57:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14007349#M22575</guid>
      <dc:creator>davemurrayrust</dc:creator>
      <dc:date>2026-02-06T12:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Minimal working example of creating a Sweep with a Guide Surface through the Python API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14007918#M22577</link>
      <description>&lt;P&gt;I think the problem is that you are passing in a Body.&amp;nbsp; Instead, what appears to be needed is an array of BRepFace.&amp;nbsp; This is consistent with the UI - guide surface is a face selection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7741B8F2-D2EF-4C3C-A719-7BB4A25F1A4F" target="_blank" rel="noopener"&gt;SweepFeatureInput.guideSurfaces Property&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-02-06 at 10.52.27 AM.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1616868i52ACCDABEE1BB94A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-02-06 at 10.52.27 AM.png" alt="Screenshot 2026-02-06 at 10.52.27 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 18:53:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14007918#M22577</guid>
      <dc:creator>jeff_strater</dc:creator>
      <dc:date>2026-02-06T18:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Minimal working example of creating a Sweep with a Guide Surface through the Python API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14007969#M22578</link>
      <description>&lt;P&gt;Thanks - and sorry to be dim, but how do I get that from the Body? It's a Surface Loft, so it should be the right form in there somewhere - I can use the output to make a surface sweep through the UI - but I can't figure out the translation steps. I tried looking across the object hierarchy in the API docs, but it wasn't immediately apparent.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 19:45:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14007969#M22578</guid>
      <dc:creator>davemurrayrust</dc:creator>
      <dc:date>2026-02-06T19:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Minimal working example of creating a Sweep with a Guide Surface through the Python API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14008235#M22581</link>
      <description>&lt;P&gt;I'm a little out of my depth here, but, from a BRepBody, you can call the faces() property:&amp;nbsp;&amp;nbsp;&lt;A href="https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-fdf337dd-6cf2-4115-ab30-9ef9fe891853" target="_blank" rel="noopener"&gt;BRepBody.faces Property&lt;/A&gt;&amp;nbsp;.&amp;nbsp; This returns a BRepFaces object, which is a collection of BRepFace.&amp;nbsp; I think this is different than what Sweep requires (an array of BRepFace).&amp;nbsp; Here is a code snippet from google that claims to show how to convert this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;import adsk.core, adsk.fusion, adsk.cam, traceback&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;def run(context):&lt;BR /&gt;ui = None&lt;BR /&gt;try:&lt;BR /&gt;app = adsk.core.Application.get()&lt;BR /&gt;ui = app.userInterface&lt;BR /&gt;design = app.activeProduct&lt;BR /&gt;&lt;BR /&gt;# Assume a body is selected&lt;BR /&gt;selectedBody = ui.activeSelections.item(0).entity&lt;BR /&gt;&lt;BR /&gt;# Get the BRepFaces collection&lt;BR /&gt;facesCollection = selectedBody.faces&lt;BR /&gt;&lt;BR /&gt;# Convert BRepFaces collection to an array (list) of BRepFace&lt;BR /&gt;facesArray = []&lt;BR /&gt;for face in facesCollection:&lt;BR /&gt;facesArray.append(face)&lt;BR /&gt;&lt;BR /&gt;# Example: Access the first face in the array&lt;BR /&gt;if len(facesArray) &amp;gt; 0:&lt;BR /&gt;firstFace = facesArray[0]&lt;BR /&gt;app.log(f'Found {len(facesArray)} faces. First face ID: {firstFace.tempId}')&lt;BR /&gt;&lt;BR /&gt;except:&lt;BR /&gt;if ui:&lt;BR /&gt;ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/P&gt;</description>
      <pubDate>Sat, 07 Feb 2026 00:36:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14008235#M22581</guid>
      <dc:creator>jeff_strater</dc:creator>
      <dc:date>2026-02-07T00:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Minimal working example of creating a Sweep with a Guide Surface through the Python API</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14011028#M22583</link>
      <description>&lt;P&gt;Hello &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4695381"&gt;@davemurrayrust&lt;/a&gt;&lt;/SPAN&gt; ,&lt;BR /&gt;&lt;BR /&gt;Did the information provided by &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/226105"&gt;@jeff_strater&lt;/a&gt;&lt;/SPAN&gt; help you and answer your question?&lt;BR /&gt;&lt;BR /&gt;If yes, please click on the "Accept Solution" button on the post(s) that solved your problem. This will assist other community users in finding and benefiting from this information.&lt;BR /&gt;&lt;BR /&gt;If not, please do not hesitate to give an update in this thread so all community members receive an update on the progression of your question, and can suggest next steps that may be helpful for you to achieve what you're looking for.&lt;BR /&gt;&lt;BR /&gt;All the best,&lt;BR /&gt;&lt;BR /&gt;Rosie| Community Manager&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 19:54:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/minimal-working-example-of-creating-a-sweep-with-a-guide-surface/m-p/14011028#M22583</guid>
      <dc:creator>rosie_lucas1</dc:creator>
      <dc:date>2026-02-09T19:54:50Z</dc:date>
    </item>
  </channel>
</rss>

