<?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 Moving a grid? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6067953#M67154</link>
    <description>&lt;P&gt;So I've been asked to synchronize grid leader locations (along the grid line) between files.&lt;BR /&gt;I thought that this would be easy using the new API for DatumPlane, BUT i was wrong. The property I want to change in the Leader is the Anchor, but that property is readonly and the documentation says: " This is a read-only property, for the this point gets always computed based on various properties of the annotation element. "&lt;BR /&gt;Well for the grid element there are no annotation elements attached to the Leader, right?&lt;BR /&gt;&lt;BR /&gt;Am i missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/Erik&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2016 12:37:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-03-03T12:37:07Z</dc:date>
    <item>
      <title>Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6067953#M67154</link>
      <description>&lt;P&gt;So I've been asked to synchronize grid leader locations (along the grid line) between files.&lt;BR /&gt;I thought that this would be easy using the new API for DatumPlane, BUT i was wrong. The property I want to change in the Leader is the Anchor, but that property is readonly and the documentation says: " This is a read-only property, for the this point gets always computed based on various properties of the annotation element. "&lt;BR /&gt;Well for the grid element there are no annotation elements attached to the Leader, right?&lt;BR /&gt;&lt;BR /&gt;Am i missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/Erik&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 12:37:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6067953#M67154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-03T12:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6207242#M67155</link>
      <description>&lt;P&gt;Hi Erik,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for keeping you waiting. Let me reach out to the Revit Engineers in order to shed some light with this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your patience and collaboration.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 19:46:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6207242#M67155</guid>
      <dc:creator>rosalesduquej</dc:creator>
      <dc:date>2016-03-09T19:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6218791#M67156</link>
      <description>&lt;P&gt;Hi Erik,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still haven't heard anything from our engineers. Thank you for your patience, As soon as I hear something I will contact you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 15:47:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6218791#M67156</guid>
      <dc:creator>rosalesduquej</dc:creator>
      <dc:date>2016-03-16T15:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6238107#M67157</link>
      <description>Hi Jaime,&lt;BR /&gt;&lt;BR /&gt;thank you for your assistance.&lt;BR /&gt;Did you hear anything yet?&lt;BR /&gt;Im anxious to know.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;/Erik</description>
      <pubDate>Mon, 28 Mar 2016 20:06:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6238107#M67157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-28T20:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6244624#M67158</link>
      <description>&lt;P&gt;Hi Erik,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; unfortunatley they Still haven't. I think they are pretty busy at the moment with the Revit 2017 version, since will come out soon.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please bare with me, I will keep reaching out to them, and as soon as I hear back will let you know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much for your patience and collaboration.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 17:52:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6244624#M67158</guid>
      <dc:creator>rosalesduquej</dc:creator>
      <dc:date>2016-03-31T17:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6252805#M67159</link>
      <description>&lt;P&gt;Hi Erik,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you once again for your patience. I spoke to the Revit engineers and they are preparing me a Macro with the explained functionality of the DatumPlane method. It is looking promising to what you are trying to do. They will probably send it to me during this week so stay tune.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 17:47:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6252805#M67159</guid>
      <dc:creator>rosalesduquej</dc:creator>
      <dc:date>2016-04-05T17:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6254916#M67160</link>
      <description>&lt;P&gt;Hi Erik,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revit Engineering got back to me with a solution for moving the grid. Here is what they wrote:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;EM&gt;The new API for DatumPlane works and the data should be computed by users according to their requirements. Here is a Macro as a sample showing how to get from A to B. Please open the file and run the ‘SynGridLeaders’, it will get the following result.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/229962i007CDD77D1FFFD96/image-size/original?v=lz-1&amp;amp;px=-1" border="0" alt="revitmacro.jpeg" title="revitmacro.jpeg" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;After Running the Macro. Result Below.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/229963i7F43551A285648D3/image-size/original?v=lz-1&amp;amp;px=-1" border="0" alt="revitmacro2.jpeg" title="revitmacro2.jpeg" /&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The Anchor property of the leader is read-only as it is computed by the Elbow and End properties set by the users. The new leader should also be set via SetLeader() method to get it work.&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find the Revit File and the code for the Macro here:&amp;nbsp;&lt;A href="https://github.com/jaimerosales/revit-macros/tree/master/SyncGridLeaders-2016" target="_blank"&gt;https://github.com/jaimerosales/revit-macros/tree/master/SyncGridLeaders-2016&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;The file attached is saved by R2016R2 version. If running the macro the grid leaders don’t change, please click ‘edit’ button of the macro, compile it then run it again. ( Remember to enable the macro when opening the file.)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Check it out and let me know, hope this solves your question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Thank you again for your patience and collaboration.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 15:46:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6254916#M67160</guid>
      <dc:creator>rosalesduquej</dc:creator>
      <dc:date>2016-04-06T15:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6262925#M67161</link>
      <description>&lt;P&gt;Hi Jaime,&lt;/P&gt;&lt;P&gt;thank you for the solution, sorry that it took me a few days to test.&lt;/P&gt;&lt;P&gt;I've tested it now, and Im afraid it still doesnt solve my problem.&lt;/P&gt;&lt;P&gt;Our grids are always straight and with a straight line I get the following exception:&lt;BR /&gt;"Autodesk.Revit.Exceptions.ArgumentException: One of the conditions is not valid: the input leader and view is not null; The leader End, Elbow, Anchor should be in the view; the End of leader should be in the datum plane curves; Elbow is between End and Anchor.&lt;BR /&gt;Parameter name: pLeader&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at Autodesk.Revit.DB.DatumPlane.SetLeader(DatumEnds datumEnd, View view, Leader pLeader)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; at GridLeaders.ThisDocument.SynGridLeaders() in c:\Users\19eer\AppData\Local\Temp\{5178E7AE-4516-4649-BB95-75BD6B9FCAD6}\Architecture\DocHookups17300\4231183040\GridLeaders\Source\GridLeaders\ThisDocument.cs:line 80"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried to find the error in the code, but I couldnt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added a 4th grid to the file and tested, please see the image below.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/231062iA597EE5FB3B3258C/image-size/original?v=lz-1&amp;amp;px=-1" alt="Gridproblem.png" title="Gridproblem.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Erik&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 09:55:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6262925#M67161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-11T09:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6269534#M67162</link>
      <description>&lt;P&gt;Hi Erik,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a bit strange, Is it possible for you to provide us with a minimum sample file (Rvt and Plugin) So I can reproduce your error on my end and be able to investigate further. It will also help engineering in case I requiere help from them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 21:22:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6269534#M67162</guid>
      <dc:creator>rosalesduquej</dc:creator>
      <dc:date>2016-04-13T21:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6270604#M67163</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've only added a grid to your file and turned of 3d propagation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code required is in the macro.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've attached my edited file in this post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Erik&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 12:20:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/6270604#M67163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-14T12:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9115841#M67164</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2340840"&gt;@rosalesduquej&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;It is worth you copying the code from the macro into this discussion so others may see it. (Your link is broken.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Anonymous&amp;nbsp;, I'm figuring you have probably sorted this by now, but I would guess that grid 4 is causing an issue because it doesn't have a leader. Use the AddLeader method to add a leader first. You'll also probably need to do a document.regenerate afterwards, before you set the leader points.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 22:04:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9115841#M67164</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2019-10-29T22:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9115847#M67165</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2340840"&gt;@rosalesduquej&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found your blog post that contains the code:&amp;nbsp;&lt;A href="https://adndevblog.typepad.com/aec/2016/04/forge-devcon-early-bird-revit-api-moving-a-grid-with-datumplane-method.html" target="_blank" rel="noopener"&gt;https://adndevblog.typepad.com/aec/2016/04/forge-devcon-early-bird-revit-api-moving-a-grid-with-datumplane-method.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Anonymous&amp;nbsp; After seeing the code I can confirm that my guess was correct.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 22:09:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9115847#M67165</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2019-10-29T22:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9115864#M67166</link>
      <description>&lt;P&gt;you beat me to it, glad you found the code!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 22:22:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9115864#M67166</guid>
      <dc:creator>rosalesduquej</dc:creator>
      <dc:date>2019-10-29T22:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9116337#M67167</link>
      <description>&lt;P&gt;Dear Matt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for picking up and answering this old thread.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So am I correct in summarising the result as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to move a grid, make sure that each and every one of the grid lines has its own leader.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As simple as that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you confirm?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 07:26:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9116337#M67167</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-10-30T07:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9118130#M67168</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Actually, I think the title to this discussion is a bit misleading.&lt;/P&gt;&lt;P&gt;It's about shortening/extending grids and adjusting the grid leader anchor points.&lt;/P&gt;&lt;P&gt;The macro that&amp;nbsp;@Anonymous&amp;nbsp;was running was failing because it expected each grid to have a leader, which grid 4 did not. In short, you can't modify a grid leader if the grid doesn't have one. You don't need a leader to lengthen/shorten a grid.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 19:25:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9118130#M67168</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2019-10-30T19:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a grid?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9118242#M67169</link>
      <description>&lt;P&gt;Thank you for the clarification. I see now. All clear and obvious.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 20:12:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/moving-a-grid/m-p/9118242#M67169</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-10-30T20:12:22Z</dc:date>
    </item>
  </channel>
</rss>

