From the course: Revit: Creating C# Plugins

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Placing views

Placing views

From the course: Revit: Creating C# Plugins

Start my 1-month free trial

Placing views

- [Instructor] In this section, we've learned how to create views, annotate them and create sheets. The last step is to learn how to place a view onto a sheet. Views are displayed on sheets via the viewport object. The viewport class is different to other views that we've looked at in that it is not actually a view. It inherits from the element class and is simply used to place views onto sheets. This can be done by using the create method within the class. This will create a new viewport at a given location. The parameters it requires is the document the view sheet ID that the view is to be placed on, the view ID for the view to be shown and an XYZ object for its location and once we have created the viewport, we can access the properties and methods that relate to the viewport object. So, using this method in a new command, let's try and place the viewport at the center of a sheet. I've currently got the Visual Studio exercise file open for this video. In here I've created a…

Contents