<?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: Transfer Project Standards Revit API in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/9816697#M60779</link>
    <description>&lt;P&gt;@Anonymous&amp;nbsp;- It seems that when using&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://www.revitapidocs.com/2020/7b56b5c2-3aff-f42b-ab47-de1f89a1070f.htm" target="_blank" rel="noopener"&gt;CopyElements&lt;/A&gt; method&lt;/SPAN&gt; to copy a WallType from one document to another if a WallType already exist with the same name the following message appears "Type has been renamed to avoid conflicts with existing element". Have you managed to transfer a WallType by overriding the existing one?&amp;nbsp;&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="Type has been renamed to avoid conflicts with existing element..jpg" style="width: 467px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/834486i97C8DC7C0F678D4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Type has been renamed to avoid conflicts with existing element..jpg" alt="Type has been renamed to avoid conflicts with existing element..jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Oct 2020 23:50:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-10-21T23:50:40Z</dc:date>
    <item>
      <title>Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828310#M60769</link>
      <description>&lt;DIV class="post-text"&gt;&lt;P&gt;I would like to transfer project standards through Revit API. I am able to copy all the elements except shared parameters. Please let me know how can I copy the shared parameters while doing transfer project standards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 Jan 2017 20:01:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828310#M60769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T20:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828338#M60770</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Have you checked out the overload of CopyElements that allows copy-pasting between documents?&lt;BR /&gt;&lt;A href="http://www.revitapidocs.com/2017/b22df8f6-3fa3-e177-ffa5-ba6c639fb3dc.htm" target="_blank"&gt;http://www.revitapidocs.com/2017/b22df8f6-3fa3-e177-ffa5-ba6c639fb3dc.htm&lt;/A&gt;&lt;BR /&gt;It should do that.&lt;BR /&gt;[Edit]p.s. There's an example in the SDK.[/Edit]&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 20:18:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828338#M60770</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2017-01-24T20:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828402#M60771</link>
      <description>&lt;P&gt;I tried using CopyElements(). But it doesn't work. It throws an error stating -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Some of the elements cannot be copied, because they are view-specific.\r\nParameter name: elementsToCopy:"&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 20:48:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828402#M60771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T20:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828418#M60772</link>
      <description>I would suggest posting code so that it can be checked.</description>
      <pubDate>Tue, 24 Jan 2017 20:54:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828418#M60772</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2017-01-24T20:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828427#M60773</link>
      <description>&lt;P&gt;Please find below the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transaction.Start();&lt;BR /&gt;FilteredElementCollector wallTypesProject = new FilteredElementCollector(doc).OfClass(typeof(WallType));&lt;BR /&gt;foreach (WallType wtcur in wallTypesProject)&lt;BR /&gt;{&lt;BR /&gt;ICollection&amp;lt;ElementId&amp;gt; copyIds = new Collection&amp;lt;ElementId&amp;gt;() { wtcur.Id };&lt;BR /&gt;CopyPasteOptions option = new CopyPasteOptions();&lt;BR /&gt;ElementTransformUtils.CopyElements(docSource, copyIds, docTarget, Transform.Identity, option);&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN&gt;transaction&lt;/SPAN&gt;.Commit();&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 20:59:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828427#M60773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T20:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828453#M60774</link>
      <description>Hi,&lt;BR /&gt;Is doc the same as docsource? Otherwise it looks okay. Are you sure the wall type doesn't exist in the target document?&lt;BR /&gt;Also, you mentioned copying shared parameters, but your code does not.&lt;BR /&gt;Are you talking about shared project parameters on the Wall category, or something else?&lt;BR /&gt;You need to be more clear about the question, and include code that allows us to run your sample (or at least shows all declarations).&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jan 2017 21:12:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6828453#M60774</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2017-01-24T21:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6830233#M60775</link>
      <description>&lt;P&gt;Clarification to my Question : I have a document called docSource. The document has all the built in parameters and we added a shared parameter to it. Now, I am trying to do transfer project standards, I am trying to copy/duplicate all walltypes to the target project which is my project. So, I am duplicating the wall types from docSource to docTarget. When I am copying all the parameters, only the particular shared parameter which we have added to docSource is not duplicating/Copying. Everything else is getting duplicated except the shared parameter we have added. I am using the below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public void TransferProjectStandards(ModelPath fileName, Document doc, Application App)&lt;BR /&gt;{&lt;BR /&gt;OpenOptions openOption = new OpenOptions();&lt;BR /&gt;openOption.DetachFromCentralOption = DetachFromCentralOption.DetachAndPreserveWorksets;&lt;BR /&gt;Document docFamily = App.OpenDocumentFile(fileName, openOption);&lt;BR /&gt;FilteredElementCollector wallTypes = new FilteredElementCollector(docFamily).OfClass(typeof(WallType));&lt;/P&gt;&lt;P&gt;WallType wallType = null;&lt;/P&gt;&lt;P&gt;foreach (WallType wt in wallTypes)&lt;BR /&gt;{&lt;BR /&gt;wallType = wt;&lt;BR /&gt;if (!CheckWallTypeExists(wt, doc))&lt;BR /&gt;{&lt;BR /&gt;using (Transaction t = new Transaction(doc))&lt;BR /&gt;{&lt;BR /&gt;t.Start("Transfer Wall Type");&lt;BR /&gt;WallType newWallType = null;&lt;/P&gt;&lt;P&gt;FilteredElementCollector wallTypesProject = new FilteredElementCollector(doc).OfClass(typeof(WallType));&lt;/P&gt;&lt;P&gt;foreach (WallType wtcur in wallTypesProject)&lt;BR /&gt;{&lt;BR /&gt;if (wtcur.Kind == wallType.Kind)&lt;BR /&gt;{&lt;BR /&gt;newWallType = wtcur.Duplicate(wallType.Name) as WallType;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;Parameter p = null;&lt;BR /&gt;foreach (Parameter p1 in newWallType.Parameters)&lt;BR /&gt;{&lt;BR /&gt;Definition d = p1.Definition;&lt;/P&gt;&lt;P&gt;if (p1.IsReadOnly)&lt;BR /&gt;{&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;p = wallType.get_Parameter(d);&lt;/P&gt;&lt;P&gt;if (null == p)&lt;BR /&gt;{&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;if (p.StorageType == StorageType.ElementId)&lt;BR /&gt;{&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;if (p.StorageType == StorageType.Double)&lt;BR /&gt;{&lt;BR /&gt;p1.Set(p.AsDouble());&lt;BR /&gt;}&lt;BR /&gt;else if (p.StorageType == StorageType.String)&lt;BR /&gt;{&lt;BR /&gt;p1.Set(p.AsString());&lt;BR /&gt;}&lt;BR /&gt;else if (p.StorageType == StorageType.Integer)&lt;BR /&gt;{&lt;BR /&gt;p1.Set(p.AsInteger());&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;t.Commit();&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:50:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6830233#M60775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-25T14:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6830366#M60776</link>
      <description>&lt;P&gt;@Anonymous,&lt;/P&gt;
&lt;P&gt;After testing this using the UI, I would suggest trying to copy the relevant&amp;nbsp;SharedParameterElement via the CopyElements fromView/ToView overload (prior to copying the wallTypes).&lt;/P&gt;
&lt;P&gt;You may want to test using a fixed element ID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know how you get on.&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;-Matt&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 15:39:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6830366#M60776</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2017-01-25T15:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6831861#M60777</link>
      <description>&lt;P&gt;@Anonymous&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you are not really copying the walltypes, but are recreating them in the target document. As Matthew suggested in a earlier post, copying them using the&lt;/P&gt;&lt;P&gt;ElementTransformUtils.CopyElements() method might be a better option, it&amp;nbsp;might even&amp;nbsp;copy the shared parameter along.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 00:52:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6831861#M60777</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2017-01-26T00:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6840338#M60778</link>
      <description>&lt;P&gt;Thanks. CopyElements did work for me. It copied all the builtin parameters from source wallType to target walltype except the shared parameter. I was able to write an API which would copy all the shared parameters to the target wallType.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2017 14:40:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/6840338#M60778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-30T14:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer Project Standards Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/9816697#M60779</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;- It seems that when using&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://www.revitapidocs.com/2020/7b56b5c2-3aff-f42b-ab47-de1f89a1070f.htm" target="_blank" rel="noopener"&gt;CopyElements&lt;/A&gt; method&lt;/SPAN&gt; to copy a WallType from one document to another if a WallType already exist with the same name the following message appears "Type has been renamed to avoid conflicts with existing element". Have you managed to transfer a WallType by overriding the existing one?&amp;nbsp;&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="Type has been renamed to avoid conflicts with existing element..jpg" style="width: 467px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/834486i97C8DC7C0F678D4D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Type has been renamed to avoid conflicts with existing element..jpg" alt="Type has been renamed to avoid conflicts with existing element..jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 23:50:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/transfer-project-standards-revit-api/m-p/9816697#M60779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-21T23:50:40Z</dc:date>
    </item>
  </channel>
</rss>

