Setting the "Title on Sheet" parameter of a view

Setting the "Title on Sheet" parameter of a view

J33C316
Advocate Advocate
1,166 Views
4 Replies
Message 1 of 5

Setting the "Title on Sheet" parameter of a view

J33C316
Advocate
Advocate

How do I set the "Title on Sheet" parameter of a view? It's not a BuiltInParameter like I expected.

 

This post no longer works either. Thanks for your help.

 

https://forums.autodesk.com/t5/revit-api-forum/how-to-set-quot-title-on-sheet-quot-property-for-a-dr...

0 Likes
Accepted solutions (1)
1,167 Views
4 Replies
Replies (4)
Message 2 of 5

so-chong
Advocate
Advocate

Hi,

 

You could try to use the LookupParameter Method to get the "Title on Sheet" parameter of a view.

 

Something like this

view.LookupParameter("Title on Sheet")
0 Likes
Message 3 of 5

J33C316
Advocate
Advocate

Thanks but I’m trying to set it not get it. I know it’s blank currently. 

0 Likes
Message 4 of 5

joshua.lumley
Advocate
Advocate
Accepted solution

Easy, title on sheet is in fact the VIEW_DESCRIPTION BIP.

 

 uidoc.ActiveView.get_Parameter(BuiltInParameter.VIEW_DESCRIPTION).Set("Hello World");

 

 

0 Likes
Message 5 of 5

so-chong
Advocate
Advocate

Well It all depends what you want to set as "Title on Sheet" value.

 

So if you want to set the view name you can do something like this

view.LookupParameter("Title on Sheet").Set(view.Name);

 

You can use String methods like Substring or Replace to change your view name.

 https://docs.microsoft.com/en-us/dotnet/api/system.string.substring?view=netcore-3.1

0 Likes