<?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: ResetPermanentTransform in Navisworks API Forum</title>
    <link>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11425328#M1834</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5884814"&gt;@m.shcheblykin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What steps did you follow to achieve the functionality you want in Navisworks UI?&lt;/P&gt;
&lt;P&gt;As far as I know, you can set Units and Transform values using the below code&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;DocumentModels models = doc.Models;
models.SetModelUnitsAndTransform();&lt;/LI-CODE&gt;
&lt;P&gt;I don't understand what you mean by Reset. In Units and Transform, there is no reset option even in the UI.&lt;/P&gt;
&lt;P&gt;Please note, if the Navisworks UI does not support what you are trying to do, the API will probably not do so either.&lt;/P&gt;
&lt;P&gt;So, it will always help to research the optimal manual approach to a solution first, before attacking the task programmatically.&lt;/P&gt;
&lt;P&gt;I hope this explains.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 07:15:09 GMT</pubDate>
    <dc:creator>naveen.kumar.t</dc:creator>
    <dc:date>2022-09-16T07:15:09Z</dc:date>
    <item>
      <title>ResetPermanentTransform</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11424490#M1833</link>
      <description>&lt;P&gt;Hello dear API professionals,&lt;/P&gt;&lt;P&gt;Could you advise what is wrong in my syntax.&lt;/P&gt;&lt;P&gt;I use a python shell. I have an NWC file in an opened NWF file.&lt;/P&gt;&lt;P&gt;This NWC file has some transformation:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mshcheblykin_0-1663270559849.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1116426i001C98689D4E84F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mshcheblykin_0-1663270559849.png" alt="mshcheblykin_0-1663270559849.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;selection = doc.CurrentSelection.SelectedItems&lt;/P&gt;&lt;P&gt;//here I have 2 options how to write it. None of them gives me an error. But non of them reset transformation either.&lt;/P&gt;&lt;P&gt;doc.Models.&lt;SPAN&gt;ResetPermanentTransform&lt;/SPAN&gt;(selection)&lt;/P&gt;&lt;P&gt;doc.Models.&lt;SPAN&gt;ResetPermanentTransform&lt;/SPAN&gt;([ selection[0] ])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please advise the correct syntax to reset transformation back to zeros&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 19:37:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11424490#M1833</guid>
      <dc:creator>m.shcheblykin</dc:creator>
      <dc:date>2022-09-15T19:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: ResetPermanentTransform</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11425328#M1834</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5884814"&gt;@m.shcheblykin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What steps did you follow to achieve the functionality you want in Navisworks UI?&lt;/P&gt;
&lt;P&gt;As far as I know, you can set Units and Transform values using the below code&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;DocumentModels models = doc.Models;
models.SetModelUnitsAndTransform();&lt;/LI-CODE&gt;
&lt;P&gt;I don't understand what you mean by Reset. In Units and Transform, there is no reset option even in the UI.&lt;/P&gt;
&lt;P&gt;Please note, if the Navisworks UI does not support what you are trying to do, the API will probably not do so either.&lt;/P&gt;
&lt;P&gt;So, it will always help to research the optimal manual approach to a solution first, before attacking the task programmatically.&lt;/P&gt;
&lt;P&gt;I hope this explains.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 07:15:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11425328#M1834</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2022-09-16T07:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: ResetPermanentTransform</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11427766#M1835</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;BR /&gt;What I am trying to do is to reset all transformation values back to original which are zeros.&lt;/P&gt;&lt;P&gt;Lets say I have nwc files that were moved and rotated previously and now I want to move and rotate them back.&lt;/P&gt;&lt;P&gt;I came to this idea coz I found that a method&amp;nbsp;&lt;STRONG&gt;OverridePermanentTransform&amp;nbsp;&lt;/STRONG&gt;increments the given transformation values to current once.&lt;/P&gt;&lt;P&gt;example: if origin X = 100m, Y =&amp;nbsp; 32.22m, Z = 4.65m&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mshcheblykin_0-1663395889294.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1117232i1D8B2F0354782AC5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mshcheblykin_0-1663395889294.png" alt="mshcheblykin_0-1663395889294.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;after&amp;nbsp;&lt;STRONG&gt;OverridePermanentTransform &lt;/STRONG&gt;method has been applied with values (100,100,100)&lt;/P&gt;&lt;P&gt;the result will be&amp;nbsp;X = 200m, Y =&amp;nbsp; 132.22m, Z = 104.65m&lt;/P&gt;&lt;P&gt;Because of this I have to reset all transformation values back to 0 and only after set new values that represent the updated location&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is below:&lt;BR /&gt;&lt;EM&gt;selection&lt;/EM&gt; = doc.CurrentSelection.SelectedItems&lt;/P&gt;&lt;P&gt;move =&amp;nbsp; &lt;STRONG&gt;Transform3D.&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;CreateTranslation&lt;/STRONG&gt;( &lt;STRONG&gt;Vector3D&lt;/STRONG&gt;(100, 100, 100)) //Here should be values in feet but for simplicity&amp;nbsp;I keep them in miters&lt;/SPAN&gt;&lt;BR /&gt;doc.Models.&lt;STRONG&gt;OverridePermanentTransform&lt;/STRONG&gt;([selection], &lt;STRONG&gt;Transform3D&lt;/STRONG&gt;(move), True)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is a method which works not like increment and simply sets new values which are given, please tell me the name of it. In this case I will not need to play with a resetting step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you ad advise what is wrong with the syntax bellow. Catching an error :&amp;nbsp;Syntax Error: unexpected EOF &lt;SPAN&gt;while&lt;/SPAN&gt; &lt;SPAN&gt;parsing&lt;/SPAN&gt; (line &lt;SPAN&gt;10&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;doc.Models.&lt;SPAN&gt;SetModelUnitsAndTransform&lt;/SPAN&gt;(selection[&lt;SPAN&gt;0&lt;/SPAN&gt;],Units.Meters,Transform3D.&lt;SPAN&gt;CreateTranslation&lt;/SPAN&gt;(&lt;SPAN&gt;Vector3D&lt;/SPAN&gt;(&lt;SPAN&gt;0&lt;/SPAN&gt;, &lt;SPAN&gt;0&lt;/SPAN&gt;, &lt;SPAN&gt;0&lt;/SPAN&gt;),False)&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2022 07:02:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11427766#M1835</guid>
      <dc:creator>m.shcheblykin</dc:creator>
      <dc:date>2022-09-17T07:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: ResetPermanentTransform</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11428958#M1836</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5884814"&gt;@m.shcheblykin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please take a look at this sample code and the screenshots attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;DocumentModels models = doc.Models;
Model model = null;
foreach(Model m in models)
     {
       if(m!=null)
         {
           model = m;
           break;
         }
      }

Rotation3D rotation3D = new Rotation3D(new UnitVector3D(0, 0, 1), 0.872665);
Vector3D vector3D = new Vector3D(2, 3, 4);//Origin
Transform3D t3d = new Transform3D(rotation3D, vector3D);
models.SetModelUnitsAndTransform(model, Units.Meters, t3d, true);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here&amp;nbsp;50 degree=0.872665 radian&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2022 09:39:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11428958#M1836</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2022-09-18T09:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: ResetPermanentTransform</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11428999#M1837</link>
      <description>&lt;P&gt;okay, I think I understood more or less navis api structure, at least that par which I need right now.&lt;/P&gt;&lt;P&gt;Looks like a navis APi forum is not really so active unlike forums for Revit and Dynamo.&lt;/P&gt;&lt;P&gt;All these API for me like jungles. There is no clear graphs or graphical tree structures to see how different APIs are arranged (Revit, Navis, Rhino3D). Always need to do numerous attempts with different things till I catch the right class for a certain method.&amp;nbsp; Can you advise any ways to study of API structures&amp;nbsp; ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also found how to reset all transformed models back to 0 values:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;doc.Models.SetModelUnitsAndTransform(doc.Models[0],Units.Feet,&lt;STRONG&gt;Transform3D.CreateIdentity&lt;/STRONG&gt;(),False)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2022 10:52:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11428999#M1837</guid>
      <dc:creator>m.shcheblykin</dc:creator>
      <dc:date>2022-09-18T10:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: ResetPermanentTransform</title>
      <link>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11430052#M1838</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5884814"&gt;@m.shcheblykin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "Reference Guide" section in the below link will help you to understand Navisworks API Structure(i.e)&lt;SPAN&gt;how different APIs are arranged in Navisworks&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://apidocs.co/apps/navisworks/2018/N_Home.htm" target="_blank" rel="noopener"&gt;https://apidocs.co/apps/navisworks/2018/N_Home.htm&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 05:53:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/navisworks-api-forum/resetpermanenttransform/m-p/11430052#M1838</guid>
      <dc:creator>naveen.kumar.t</dc:creator>
      <dc:date>2022-09-19T05:53:06Z</dc:date>
    </item>
  </channel>
</rss>

