<?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: Undo/Delete feature in Direct design type in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/undo-delete-feature-in-direct-design-type/m-p/10797799#M7375</link>
    <description>&lt;P&gt;Direct modeling is making direct changes to the model, without capturing any history about that change.&amp;nbsp; Some "features" are shown in the browser, but in direct modeling, they are just labeling the set of faces that were created by a particular operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would have thought executing the Undo command would do it though. Each action in a script is transacted, so you can undo each action independently.&amp;nbsp; If you've written a command, everything that happens in the execute event is wrapped in a single transaction so you can't undo individual actions in that case.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 02:17:39 GMT</pubDate>
    <dc:creator>BrianEkins</dc:creator>
    <dc:date>2021-12-03T02:17:39Z</dc:date>
    <item>
      <title>Undo/Delete feature in Direct design type</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/undo-delete-feature-in-direct-design-type/m-p/10780645#M7374</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Concerning the performance issues of my functions, I have switched the modelling environment from 'Parametric' to 'Direct' (which by the way, speeds up everything significantly). The problem with Direct design mode is that, it seems like I cannot obtain the returned object of the features. For example, I usually try to delete some faces using the feature below:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;delete = rootComp.features.deleteFaceFeatures.add(faceToDelete)&lt;/LI-CODE&gt;&lt;P&gt;After deleting the faces, depends on some criteria, I might want to undo this action (revert the deletion). I used:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;delete.deleteMe()&lt;/LI-CODE&gt;&lt;P&gt;to achieve this in 'Parametric' mode. However in 'Direct' mode, I found that the deleteFacesFeatures.add() method returned None instead of the feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if this is the intended design of 'Direct' mode. Is there any workaround to undo the action (deletion of faces, in this case)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the UndoCommand, but it seems to undo the whole thing (entire execution of my script) instead of just the deletion. Maybe I am missing something here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion / help is highly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 03:23:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/undo-delete-feature-in-direct-design-type/m-p/10780645#M7374</guid>
      <dc:creator>j.han97</dc:creator>
      <dc:date>2021-11-25T03:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Undo/Delete feature in Direct design type</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/undo-delete-feature-in-direct-design-type/m-p/10797799#M7375</link>
      <description>&lt;P&gt;Direct modeling is making direct changes to the model, without capturing any history about that change.&amp;nbsp; Some "features" are shown in the browser, but in direct modeling, they are just labeling the set of faces that were created by a particular operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would have thought executing the Undo command would do it though. Each action in a script is transacted, so you can undo each action independently.&amp;nbsp; If you've written a command, everything that happens in the execute event is wrapped in a single transaction so you can't undo individual actions in that case.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 02:17:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/undo-delete-feature-in-direct-design-type/m-p/10797799#M7375</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2021-12-03T02:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Undo/Delete feature in Direct design type</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/undo-delete-feature-in-direct-design-type/m-p/10797899#M7376</link>
      <description>&lt;P&gt;I see. I need to study more about transactions to understand this better. Anyway, this is not a big issue for me since I intended to implement an extra 'safety' measure to avoid breaking the model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 03:43:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/undo-delete-feature-in-direct-design-type/m-p/10797899#M7376</guid>
      <dc:creator>j.han97</dc:creator>
      <dc:date>2021-12-03T03:43:10Z</dc:date>
    </item>
  </channel>
</rss>

