<?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: pattern inputEntities failing in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9672168#M11432</link>
    <description>&lt;P&gt;Thanks Brian,&lt;/P&gt;&lt;P&gt;I can now get to the input Entities of the pattern.&lt;/P&gt;&lt;P&gt;I want to see if this is a threaded hole &amp;amp; to get the thread details.&lt;/P&gt;&lt;P&gt;However, the 'input entities' gives me a brep face.&lt;/P&gt;&lt;P&gt;My question is how to I determine if the 'input entity' of a pattern is a threaded hole?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Dave W&lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2020 14:16:56 GMT</pubDate>
    <dc:creator>DWhiteley</dc:creator>
    <dc:date>2020-08-04T14:16:56Z</dc:date>
    <item>
      <title>pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9579794#M11417</link>
      <description>&lt;P&gt;Can anyone tell me why this fails?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;rectangularPatternFeature&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;patterns:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ients&amp;nbsp;=&amp;nbsp;rectangularPatternFeature.inputEntities # this line&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Jun 2020 10:00:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9579794#M11417</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-06-15T10:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9583105#M11418</link>
      <description>&lt;P&gt;There could be multiple reasons for failure. May not be the obvious one but you can check if the entry in patterns collection is null for some reason. If not then you can find out the one entry which is leading to failure probably by adding your code in try/catch bock. We usually throw the exception if the API method fails for some reason on our side and catch block would be able to let you know what message you are getting on your side. This might help to know the reason of failure. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 16:49:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9583105#M11418</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2020-06-16T16:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9583481#M11419</link>
      <description>&lt;P&gt;Thanks for your reply. So I made a new model with a hole and patterned the hole.&lt;/P&gt;&lt;P&gt;I ran this simple script and it failed at the .inputEntities line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;adsk.core,&amp;nbsp;adsk.fusion,&amp;nbsp;adsk.cam,&amp;nbsp;traceback,&amp;nbsp;os&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;def&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;run&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;context):&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ui&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;None&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;app&amp;nbsp;=&amp;nbsp;adsk.core.Application.get()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ui&amp;nbsp;&amp;nbsp;=&amp;nbsp;app.userInterface&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;product&amp;nbsp;=&amp;nbsp;app.activeProduct&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;design&amp;nbsp;=&amp;nbsp;adsk.fusion.Design.cast(product)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;allComps&amp;nbsp;=&amp;nbsp;design.allComponents&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;comp&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;allComps:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;features&amp;nbsp;=&amp;nbsp;comp.features&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;patterns&amp;nbsp;=&amp;nbsp;features.rectangularPatternFeatures&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;rectangularPatternFeature&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;patterns:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ient&amp;nbsp;=&amp;nbsp;rectangularPatternFeature.inputEntities&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;#&amp;nbsp;this&amp;nbsp;fails&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;except&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;ui:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ui.messageBox(&lt;/SPAN&gt;&lt;SPAN&gt;'Failed:&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;{}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;.format(traceback.format_exc()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Jun 2020 19:49:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9583481#M11419</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-06-16T19:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9589137#M11420</link>
      <description>&lt;P&gt;I would really appreciate an answer on this. It looks like there is a problem with the API.&lt;/P&gt;&lt;P&gt;(I'm trying to get access to the inputEntities for patterns).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 08:55:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9589137#M11420</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-06-19T08:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9591561#M11421</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/241689"&gt;@DWhiteley&lt;/a&gt;&amp;nbsp;I am able to notice the problem. I need to check why it is implemented like that but the workaround is just rolled back the timeline just before rectangular pattern feature. I will get back once I am having more information available. Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jun 2020 04:05:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9591561#M11421</guid>
      <dc:creator>goyals</dc:creator>
      <dc:date>2020-06-21T04:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9591951#M11422</link>
      <description>Thanks for the feedback. I need this to work for me to finish an app off to integrate F360 with FeatureCAM.&lt;BR /&gt;</description>
      <pubDate>Sun, 21 Jun 2020 14:59:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9591951#M11422</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-06-21T14:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9602790#M11423</link>
      <description>&lt;P&gt;This failure is as-designed.&amp;nbsp; You'll see this with most of the features whenever you try to query or edit the entities that were provided as input when the feature was created.&amp;nbsp; You can still get the entities but you need to roll the timeline back to just before the feature you're querying was created.&amp;nbsp; This is because the input entities are only guaranteed to exist at that point in time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best example to illustrate this is the fillet feature.&amp;nbsp; If you try to query for edges that were input to the fillet feature after the fillet has been created, they can't be returned because they were consumed by the fillet feature and no longer exist.&amp;nbsp; However, if your roll back the timeline to just before the fillet feature, the edges are now available again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know you weren't creating a fillet but similar cases can exist with any feature.&amp;nbsp; In most cases, it's not the feature you created that would consume the inputs, but subsequent features could.&amp;nbsp; It's also possible that the input entities do still exist, but Fusion doesn't check for that and plays it safe by forcing a roll back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the same behavior you see in the UI too.&amp;nbsp; Whenever you edit a feature, Fusion rolls the timeline back to a point just before that feature existed.&amp;nbsp; You can now edit the input and then clicking OK, which moves the timeline back to where it was.&amp;nbsp; Here's how to do it in code.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        des = adsk.fusion.Design.cast(app.activeProduct)
        root = des.rootComponent

        sk = root.sketches.add(root.xYConstructionPlane)
        circle = sk.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(0,0,0), 5)
        prof = sk.profiles.item(0)

        ext = root.features.extrudeFeatures.addSimple(prof, adsk.core.ValueInput.createByString('2 in'), adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        filletInput = root.features.filletFeatures.createInput()
        edges = adsk.core.ObjectCollection.create()
        edges.add(ext.bodies.item(0).edges.item(0))

        filletInput.addConstantRadiusEdgeSet(edges, adsk.core.ValueInput.createByString("0.5 in"), False)
        fillet = root.features.filletFeatures.add(filletInput)

        # Get the current position of the stop node in the timeline.
        position = des.timeline.markerPosition

        # Roll the timeline to before the feature to edit.
        fillet.timelineObject.rollTo(True)

        # Edit the feature
        edgeSet = adsk.fusion.ConstantRadiusFilletEdgeSet.cast(fillet.edgeSets.item(0))
        edges = adsk.core.ObjectCollection.create()
        edges.add(ext.bodies.item(0).edges.item(0))
        edges.add(ext.bodies.item(0).edges.item(1))
        edgeSet.edges = edges

        # Move the node to the original position.
        des.timeline.markerPosition = position
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 03:34:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9602790#M11423</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-06-26T03:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9603210#M11424</link>
      <description>&lt;P&gt;Many thanks for the response &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5741855"&gt;@BrianEkins&lt;/a&gt;&amp;nbsp;, I'm sure it will also assist anyone who wants to EDIT the feature. However, I do not, I only want to view. At no point do I want to edit the component.&lt;/P&gt;&lt;P&gt;Here's what I'm trying to do and what I have tried so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to access ALL the threaded holes in the component (find their thread data and positions - all thanks to your help). I can do that until a threaded hole is in a pattern.&lt;/P&gt;&lt;P&gt;From the API, I cannot find out if the feature has a pattern as a parent. So I thought that I would iterate through all the rectangular &amp;amp; circular patterns and see if the input entity is a threaded hole (or hole). I cannot do that unless I roll back each and every pattern in the component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there no easier way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also the documentation needs updating:&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="Annotation 2020-06-26 100547.png" style="width: 967px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/788606iCDE5C8D0D46C7398/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-06-26 100547.png" alt="Annotation 2020-06-26 100547.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance, Dave Whiteley&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 09:07:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9603210#M11424</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-06-26T09:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9603894#M11425</link>
      <description>&lt;P&gt;Currently, there isn't any other way.&amp;nbsp; You have to roll back to be able to query the inputs.&amp;nbsp; I don't see that changing in the future but there are a couple of things that would be nice to have in the API that would help.&amp;nbsp; The first is some control of transactions.&amp;nbsp; You would still be doing all the roll backs but instead of moving the marker back to where it was you could abort the transaction where you moved the marker to before the feature.&amp;nbsp; This would do two things; first it wouldn't pollute the undo list and second it would be faster because it would skip the recompute of the model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other thing that would be nice is something that Inventor supports. No matter how the thread is created, you can get if there is a thread and the thread information directly from the face that has the thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, neither one of these currently exist.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 15:03:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9603894#M11425</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-06-26T15:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9603959#M11426</link>
      <description>Thanks for your fast response Brian. That’s a real shame. I’ll just have to roll back.&lt;BR /&gt;I’m used to the mature Inventor API and probably expecting too much at the moment.&lt;BR /&gt;&lt;BR /&gt;Dave&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Jun 2020 15:24:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9603959#M11426</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-06-26T15:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9605221#M11427</link>
      <description>&lt;P&gt;Thanks Brian, I can now rollback to before the pattern. So now the last feature is either a hole (that I want) or something else. How do I now access the last feature in the timeline to critigue it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jun 2020 15:23:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9605221#M11427</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-06-27T15:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9617309#M11428</link>
      <description>&lt;P&gt;I'm not sure why you would need to get the feature just before the current timeline position.&amp;nbsp; As far as the pattern feature, any feature could have been used as input, not just the feature before the pattern.&amp;nbsp; You can get the input features directly from the pattern using the inputEntities property of the RectangularPattern object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it is possible to get the feature just before the current timeline position too.&amp;nbsp; The following code should report the name of that feature.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        des = adsk.fusion.Design.cast(app.activeProduct)
        root = des.rootComponent

        timeline = des.timeline
        lastActive = timeline.item(timeline.markerPosition - 1)

        message = ""
        try:
            entity = lastActive.entity
            message = entity.name + ' (' + entity.objectType + ')'
        except:
            message = "Unknown"

        ui.messageBox('Last active node: ' + message)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 04 Jul 2020 00:37:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9617309#M11428</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-07-04T00:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9619333#M11429</link>
      <description>&lt;P&gt;Looks like we're going round in circles here.&lt;/P&gt;&lt;P&gt;The InputEntities are what I wanted in the first place, but that doesn't work. Take a look at the start of this forum trail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very frustrating....Dave&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 08:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9619333#M11429</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-07-06T08:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9620971#M11430</link>
      <description>&lt;P&gt;Here's a sample that demonstrates the complete workflow.&amp;nbsp; Select a rectangular pattern and it will get the input entities and list them out in the text command window.&amp;nbsp; You can see it does this by rolling back the timeline, getting the inputs, and then repositioning back to where it was.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import adsk.core, adsk.fusion, adsk.cam, traceback

_ui = None
def run(context):
    global _ui
    try:
        app = adsk.core.Application.get()
        _ui  = app.userInterface
        des = adsk.fusion.Design.cast(app.activeProduct)
        root = des.rootComponent

        sel = _ui.selectEntity('Select rectangular pattern feature.', 'Features')
        pattern = adsk.fusion.RectangularPatternFeature.cast(sel.entity)

        if pattern:
            # Get current position of timeline.'
            timeline = des.timeline
            lastActive = timeline.item(timeline.markerPosition - 1)

            # Roll it to just before the rectangular pattern feature.'
            pattern.timelineObject.rollTo(True)

            # Get the inputs.
            WriteToTextWindow('Input Entities')
            for input in pattern.inputEntities:
                if getattr(input, "name", None):
                    name = ', (' + input.name + ')'
                else:
                    name = ""

                WriteToTextWindow('   ' + input.objectType + name)

            lastActive.rollTo(False)
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


def WriteToTextWindow(text):
    # Get the palette that represents the TEXT COMMANDS window. 
    textPalette = _ui.palettes.itemById('TextCommands')

    # Make sure the palette is visible. 
    if not textPalette.isVisible: 
        textPalette.isVisible = True

    # Write the text. 
    textPalette.writeText(text)   &lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 06 Jul 2020 23:56:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9620971#M11430</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2020-07-06T23:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9622380#M11431</link>
      <description>&lt;P&gt;&lt;EM&gt;It's now all making sense. Many thanks for you guidance and patience Brian.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Dave&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 15:55:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9622380#M11431</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-07-07T15:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: pattern inputEntities failing</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9672168#M11432</link>
      <description>&lt;P&gt;Thanks Brian,&lt;/P&gt;&lt;P&gt;I can now get to the input Entities of the pattern.&lt;/P&gt;&lt;P&gt;I want to see if this is a threaded hole &amp;amp; to get the thread details.&lt;/P&gt;&lt;P&gt;However, the 'input entities' gives me a brep face.&lt;/P&gt;&lt;P&gt;My question is how to I determine if the 'input entity' of a pattern is a threaded hole?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Dave W&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 14:16:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/pattern-inputentities-failing/m-p/9672168#M11432</guid>
      <dc:creator>DWhiteley</dc:creator>
      <dc:date>2020-08-04T14:16:56Z</dc:date>
    </item>
  </channel>
</rss>

