BuiltInParameter Clarification: VIEWER_SHEET_NUMBER vs. VIEWPORT_SHEET_NUMBER

BuiltInParameter Clarification: VIEWER_SHEET_NUMBER vs. VIEWPORT_SHEET_NUMBER

jpclark
Explorer Explorer
451 Views
2 Replies
Message 1 of 3

BuiltInParameter Clarification: VIEWER_SHEET_NUMBER vs. VIEWPORT_SHEET_NUMBER

jpclark
Explorer
Explorer

When using Revit Lookup to snoop the parameters of a floor plan view that is placed on a sheet, there are two "Sheet Number" parameters, one using VIEWER_SHEET_NUMBER and one using VIEWPORT_SHEET_NUMBER. Both have the same value, at least in my testing, i.e. "E101". Does anyone know the difference between them?

 

Most posts I've found on the forums and general internet are using VIEWPORT_SHEET_NUMBER when trying to get the sheet number that the view is placed on, and everything is working fine in my code. I'm just asking for my own development and curiosity. Thanks!

0 Likes
Accepted solutions (1)
452 Views
2 Replies
Replies (2)
Message 2 of 3

TripleM-Dev.net
Advisor
Advisor
Accepted solution

Hi @jpclark,

 

VIEWER_DETAIL_NUMBER builtin parameter is always available for views even if not placed on sheets.

But this parameter is Read-only, so if you don't want to check if it exists and only need to read the value it this is a good choice. It reads "-" if the view isn't placed on a sheet.

 

VIEWPORT_DETAIL_NUMBER builtin parameter is only available if the view is placed on a sheet and can be edited.

Also note that editing this, the value has to be unique for the sheet it's on even during editing!

 

So depending the needs of the addin chose the best matching it.

 

- Michel

 

 

0 Likes
Message 3 of 3

jpclark
Explorer
Explorer

Thanks @TripleM-Dev.net, that's an interesting little nuance for sure. Great to know!

0 Likes