<?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: My First Plugin - Quick modification in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/my-first-plugin-quick-modification/m-p/7408641#M55854</link>
    <description>&lt;P&gt;Dear Elie,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your constructive criticism and extremely helpful advice and suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will pass them on to my developer support team colleagues&amp;nbsp;and see whether we can find time to update and clarify the samples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologise for the current state of affairs there; they really are a bit out of date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another useful place to get started with Revit development is to follow the hello world samples discussed in the official developer guide:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/RVT/2018/ENU/?guid=GUID-93BC4416-FA94-44B3-AA66-931839DA44B4" target="_blank"&gt;http://help.autodesk.com/view/RVT/2018/ENU/?guid=GUID-93BC4416-FA94-44B3-AA66-931839DA44B4&lt;/A&gt;&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;</description>
    <pubDate>Tue, 26 Sep 2017 07:48:59 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2017-09-26T07:48:59Z</dc:date>
    <item>
      <title>My First Plugin - Quick modification</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/my-first-plugin-quick-modification/m-p/7408596#M55853</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I refer to the&amp;nbsp;high entropy body of knowledge&amp;nbsp;in&amp;nbsp;My First Plugin: &lt;A href="http://www.autodesk.com/myfirstrevitplugin" target="_blank"&gt;http://www.autodesk.com/myfirstrevitplugin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another thread is dealing with issues some users are facing getting the plugin to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above linked page includes a feedback email which has bounced back ("myfirstplugin wasn't found at autodesk.com"), so I am posting&amp;nbsp;here in case new users seek to implement the same modification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue #1:&lt;/STRONG&gt; location of the plugin&lt;/P&gt;&lt;P&gt;Not all users have access to the addins folder in Program Files, but all users have access to the %AppData%\Roaming\Autodesk\Revit\addins\&amp;lt;version&amp;gt; folder. If this is mentioned in the tutorial it can reduce the number of questions asked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue #2:&lt;/STRONG&gt; unfamiliar behavior&lt;/P&gt;&lt;P&gt;The code does not properly &lt;STRONG&gt;copy&lt;/STRONG&gt; the group. It just &lt;STRONG&gt;places&lt;/STRONG&gt; it where you click, which could be in the middle of the other room. A more familiar&amp;nbsp;way is to do a Copy From: To:. Only 3 lines of code including 2 modifications are required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Modification #1:&lt;/U&gt; Pick 2 points and calculate the distance between the two, instead of picking only 1 point&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do so, replace the following code in the original lesson:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//Pick a point
XYZ point = sel.PickPoint("Please pick a point to place group");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//Pick a point
     XYZ pointFrom = sel.PickPoint("Pick a point to copy From");
     XYZ pointTo = sel.PickPoint("Pick a point to copy To");
     //Calculate the distance between the two points
     XYZ ptDist = pointTo - pointFrom;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Modification #2:&lt;/U&gt; Use the Copy method instead of Place&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replace the following line which falls between the trans.Srtat and trans.Commit lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    doc.Create.PlaceGroup(point, group.GroupType);     &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ElementTransformUtils.CopyElement(doc, elem.Id, ptDist);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, a suggestion: the text seem to entice Revit users into programming. In this regard, I&amp;nbsp;would consider doing the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add Lesson 0 (or renumber the lessons): Implement the same code in a macro using the Edit / SharpDevelop ready accessible from inside Revit, without going to MS Visual Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then Lesson 1 could become:&amp;nbsp;Now let's do this again by converting this macro into an add-in.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 07:29:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/my-first-plugin-quick-modification/m-p/7408596#M55853</guid>
      <dc:creator>elie.accari</dc:creator>
      <dc:date>2017-09-26T07:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: My First Plugin - Quick modification</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/my-first-plugin-quick-modification/m-p/7408641#M55854</link>
      <description>&lt;P&gt;Dear Elie,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your constructive criticism and extremely helpful advice and suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will pass them on to my developer support team colleagues&amp;nbsp;and see whether we can find time to update and clarify the samples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologise for the current state of affairs there; they really are a bit out of date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another useful place to get started with Revit development is to follow the hello world samples discussed in the official developer guide:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/RVT/2018/ENU/?guid=GUID-93BC4416-FA94-44B3-AA66-931839DA44B4" target="_blank"&gt;http://help.autodesk.com/view/RVT/2018/ENU/?guid=GUID-93BC4416-FA94-44B3-AA66-931839DA44B4&lt;/A&gt;&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;</description>
      <pubDate>Tue, 26 Sep 2017 07:48:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/my-first-plugin-quick-modification/m-p/7408641#M55854</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-09-26T07:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: My First Plugin - Quick modification</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/my-first-plugin-quick-modification/m-p/7408921#M55855</link>
      <description>&lt;P&gt;Dear Elie,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I published your suggestions here for future reference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2017/09/my-first-revit-plugin-enhancements.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2017/09/my-first-revit-plugin-enhancements.html&lt;/A&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;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 09:23:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/my-first-plugin-quick-modification/m-p/7408921#M55855</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2017-09-26T09:23:30Z</dc:date>
    </item>
  </channel>
</rss>

