These steps will help create structured view naming as per:
STANDARDS > VIEWS > NAMING VIEWS
It assumes starting with a project file with none, or very few, values in Sheet Series.SH parameters.
Note that values set by View Templates can not be changed by these routines (this may cause an error to display, which can be ignored).
Best practice is to untick Sheet Series.SH in all view templates before running these routines (Sheet Series.SH can be ticked again afterwards).
These dynamo routines are not hard coded, all values can be changed including parameter names.
1. ADD PREFIX BASED ON VIEW TYPE.
Add a prefix to view names on particular view types.
Edit to add prefix of "W_" to views of type "working".
Edit to add prefix of "Z_" to views of type "management".
USE:
RenameViewFromViewType
DESCRIPTION:
Add prefix to view name based on the view type name. Place old name in 'Title on Sheet' parameter. Also makes view name lowercase.
2. ADD PREFIX AND USERNAME TO VIEWS NOT ON SHEETS
This identifies views created but not on sheets or marked as working. By default these types of views are considered personal temporary views.
Will add prefix X-(username) to all views not on sheets and that don't have an "X" or "Z_" prefix. Also put "working"' into parameter Sheet Series.SH.
USE:
RenameViewByCreator
DESCRIPTION:
Add prefix to view name containing creator's name. Put value in sheet series parameter. Place old name in 'Title on Sheet' parameter.
Only applies to views not on sheets. Will skip views with certain prefix.
3. SET SHEET SERIES FROM SHEET NUMBER
Will place a values in Sheet Series.SH based on the number series of the sheet the view is on.
e.g. Views on a sheet numbered "7110" will have "7000 INTERIORS" placed in their Sheet Status.SH parameter.
Also the sheet "7110" will have "7000 INTERIORS" placed in its Sheet Status.SH parameter.
Note that sheet series values are hard coded. The Dynamo graph will need to be edited to change values (quit without saving if you make any changes).
USE:
SetViewSheetSeriesFromSheetNo
DESCRIPTION:
Reads first few characters of sheet number a view is on and uses those to place a specified value into a parameter.
4. RENAME VIEWS ON SKETCH SHEETS
Rename views on sheets with a sheet number starting with SK by adding the sheet number as a prefix. The original name gets put into the Title on Sheet parameter.
e.g. views on sheet number "SK-005" have "SK005_" added to the beginning of their name.
USE:
RenameViewFromSheetNo
DESCRIPTION:
Add prefix to view name based on the sheet number the view is placed on. Place old name in 'Title on Sheet' parameter.
5. SET SHEET SERIES FROM VIEW NAME PREFIX
Set Sheet Series.SH parameter to a value based on the prefix of a view's name.
e.g. Place "working" in parameter Sheet Series.SH for all views whose name begins with "W_".
Edit to add "working" to views beginning with "W_"
Edit to add "management" to views beginning with "Z_"
Edit to add "sketch" to views beginning with "SK"
USE:
SetViewParameterFromViewName
DESCRIPTION:
Gets all views whose names contain certain text, places a value in a parameter of those views.
6. SET SHEET SERIES FROM SHEET NUMBER PREFIX
Set Sheet Series.SH parameter of a sheet to a value based on the prefix of the sheet's number.
e.g. Place "sketch" in parameter Sheet Series.SH for all sheets whose number begins with "SK".
Edit to add "sketch" to views beginning with "SK".
If there are other sheet numbers with prefixes (e.g. TP) do it to them as well (e.g. place "planning" in Sheet Series.SH).
USE:
SetViewParameterFromSheetNoPrefix
DESCRIPTION:
Gets all views whose sheet number starts with certain text, places a value in a parameter of those views.