Monday, 16 February 2009

Creating a new drafting view

I saw a query on the discussion groups about creating a draft view and setting the title on sheet, so I thought I'd have a stab at it and make a little post-ette on t'blog.

Dim newView As ViewDrafting = revitApp.ActiveDocument.Create.NewViewDrafting

newView.ViewName = viewName
newView.Scale = viewScale
newView.Parameter("Title on Sheet").Set(sheetName)

And of course if you want to create other types of view these are the available methods:

Document.NewView3D - Creates a new 3D view.
Document.NewViewDrafting - Creates a new drafting view.
Document.NewViewPlan - Creates a plan view based on the specified level.
Document.NewViewSection - Creates a new section view.
Document.NewViewSheet - Creates a new sheet view.

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!