Create a view template

Create a view template

m.vallee
Advocate Advocate
6,041 Views
21 Replies
Message 1 of 22

Create a view template

m.vallee
Advocate
Advocate

Hi,

 

I would like to know if it is now possible to create a view template, I mean from scratch, without copying an existing one.

I think it was the purpose of CF-1509 [API wish: create view template -- 09693106].

 

If not, is it possible instead to create a view template from the current view ?

It is possible with the UI :

  • with the command called "Create Template from Current View"
  • or with the right-click context menu "Create View Template From View".

Thanks a lot for your help.

 

Best regards,

 

Maxime

6,042 Views
21 Replies
Replies (21)
Message 21 of 22

jeremytammik
Autodesk
Autodesk

One. Please excuse the use of RTFM. I do not mean it as offence, more as a joke, or simply a common abbreviation:

 

https://en.wikipedia.org/wiki/RTFM

  

Two. I completely disagree that "the info could not be found so easily if not working for Autodesk".

 

This information is published twice over in the Revit 2020 SDK, both in "Revit Platform API Changes and Additions.docx" and in the RevitAPI.chm help file.

 

The Building Coder.grabs that information and puts it online for easier web searching.

 

Three. Create a new view template from scratch via the API: create new view and convert it to a view template.

 

Four: Modify a view template via the API: Hmm. I don't know for sure. Please explain exactly what you need, how important it is for you, and I can discuss with the development team.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 22 of 22

m.vallee
Advocate
Advocate

One. Ok no problem, maybe I did not understand it correctly because I am not a fluent English speaker.

 

Two. I agree the info is published both in the R2020 API documentation and in the Building Coder. But the corresponding web searches don't directly lead to it. I know I should have looked better in the R2020 API doc before asking for news here.

But I guess the best way to be quickly aware of a problem - which has been raised both in the Revit API forum and in the Revit Idea Station website - being solved would be to have some updates from the Autodesk team posted where it was raised.

 

Three. But then if you don't want to keep the view you have to delete it. Ok why not. This could be encapsulated in a dedicated method though.

 

Four. Please see the corresponding Revit idea post : https://forums.autodesk.com/t5/revit-ideas/set-view-template-from-api/idi-p/6661957

As a view template is a view, I guess you can add/remove filters directly into it, without it to be previously applied on a view. Is it correct ?

 

Best regards.

Maxime

 

0 Likes