How to set "Title on Sheet" property for a Drafting View...

How to set "Title on Sheet" property for a Drafting View...

Fred_Schreck
Contributor Contributor
1,021 Views
5 Replies
Message 1 of 6

How to set "Title on Sheet" property for a Drafting View...

Fred_Schreck
Contributor
Contributor
Hello:

I'm writing a VSTA macro to create a new drafting view. I want to be able to specify the view name, scale, and "Title on Sheet" parameters for the drafting view. Here's the code so far:

Private Sub glNewView(ByVal strViewName As String, ByVal strSheetName As String, ByVal intViewScale As Integer)

Dim myDraftingView As ViewDrafting = Me.Create.NewViewDrafting()

myDraftingView.ViewName = strViewName
myDraftingView.Parameter("VIEWPORT_SHEET_NAME").SetValueString(strSheetName)
myDraftingView.Scale = intViewScale

End Sub


In VSTA IDE reports that 'Parameter' is not a member of 'Autodesk.Revit.Elements.ViewDrafting'

How can I set the "Title on Sheet" parameter?


Thanks in advance,

Fred Schreck
San Francisco, CA
0 Likes
1,022 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Hi Fred try this, it works for me:

myDraftingView.Parameter("Title on Sheet").Set(strSheetName)

regards
Ed
0 Likes
Message 3 of 6

J33C316
Advocate
Advocate

This no longer works in Revit 2019. Anyone know how to get the "Title on Sheet" parameter value? It doesn't appear to be a BuiltInParameter. Thanks.

0 Likes
Message 4 of 6

joshua.lumley
Advocate
Advocate
 uidoc.ActiveView.get_Parameter(BuiltInParameter.VIEW_DESCRIPTION).Set("Hello World");
Message 5 of 6

peteregan
Contributor
Contributor

Easily discovered with Revit Lookup:

 

peteregan_0-1599164175359.png

 

Message 6 of 6

J33C316
Advocate
Advocate

Thanks. I'd accept this as the solution but the button is missing for some reason. 

0 Likes