<?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 Create a view template in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/3161696#M81403</link>
    <description>&lt;P&gt;It's possible to create a view﻿&amp;nbsp;template?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that there is a property IsTemplate but is read-only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A view templates is not tied to a level but if I try to use the NewViewPlan() method passing a null value as a level, Revit throw an exception.﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Sep 2011 17:35:44 GMT</pubDate>
    <dc:creator>michele.verda</dc:creator>
    <dc:date>2011-09-17T17:35:44Z</dc:date>
    <item>
      <title>Create a view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/3161696#M81403</link>
      <description>&lt;P&gt;It's possible to create a view﻿&amp;nbsp;template?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed that there is a property IsTemplate but is read-only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A view templates is not tied to a level but if I try to use the NewViewPlan() method passing a null value as a level, Revit throw an exception.﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Sep 2011 17:35:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/3161696#M81403</guid>
      <dc:creator>michele.verda</dc:creator>
      <dc:date>2011-09-17T17:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create a view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/3162242#M81404</link>
      <description>&lt;P&gt;Dear Michele,&lt;BR /&gt;&lt;BR /&gt;I am afraid this is currently not possible. At least I see an open wish list item in ur database for this functionality. I added a note of your wish to it.&lt;BR /&gt;&lt;BR /&gt;Cheers, Jeremy.&lt;BR /&gt;﻿--&lt;BR /&gt;Jeremy Tammik&lt;BR /&gt;Autodesk Developer Network -- &lt;A href="http://www.autodesk.com/joinadn" target="_blank"&gt;http://www.autodesk.com/joinadn&lt;/A&gt;&lt;BR /&gt;The Building Coder -- &lt;A href="http://thebuildingcoder.typepad.com" target="_blank"&gt;http://thebuildingcoder.typepad.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2011 09:14:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/3162242#M81404</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2011-09-19T09:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create a view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/5075954#M81405</link>
      <description>&lt;P&gt;Has there been any development on Creating View Template in 2014/2015? Or is it possible to copy any existing View Template and then adjust properties to suit requirements? I have only just started looking so have not done a lot of research yet. Dale&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 08:31:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/5075954#M81405</guid>
      <dc:creator>Dale.Bartlett</dc:creator>
      <dc:date>2014-06-05T08:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create a view template</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/5859098#M81406</link>
      <description>&lt;P&gt;Please note that this is very probably very unsupported - at least it feels very weird to me. But it works, so I thought I might as well share it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public View duplicateTemplate(View template, string newName)
{
if (template == null || !template.IsTemplate) return null;&lt;BR /&gt;Document doc = template.Document;
var newIds = ElementTransformUtils.CopyElement(doc, template.Id, XYZ.Zero);
ElementId newId = newIds.FirstOrDefault();
View newTemplate = doc.GetElement(newId) as View;
if (newTemplate != null) newTemplate.Name = newName;
return newTemplate;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested this in Revit 2015 and 2016.&lt;/P&gt;&lt;P&gt;Duplicate a view: View.Duplicate&lt;/P&gt;&lt;P&gt;Duplicate a view that is a template: ElementTransformUtils.CopyElement(doc, id, XYZ.Zero)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 13:31:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-a-view-template/m-p/5859098#M81406</guid>
      <dc:creator>ABuschmann</dc:creator>
      <dc:date>2015-10-13T13:31:33Z</dc:date>
    </item>
  </channel>
</rss>

