Collect the texts of the viewports tags directly on the drawing sheet

Viewport tags assume values that can be derived from parameter combinations (type of view + associated level, type of view + detail etc.) or even no value. Is it possible to access and collect the texts of the viewport tags directly on the drawing sheet?

Could you upload an image or two to clarify more what you’re asking?

If I am understanding correctly, I think you are saying you want to gather the text that appears in a Viewport’s View Title? This parameter is populated by the View (of the Viewport); if the View has a parameter value for “Title on Sheet”, the Viewport title shows that value, if the “Title on Sheet” parameter value is empty, the Viewport title shows the value for the View’s parameter “View Name”.

1 Like

The Viewport tag text is not equal to “Title on Sheet” parameter either “View Name”. So I can’t pass this value to another parameter (a Title Block parameter in this case)

The “Type” and “Associated Level” parameters still belong to the Viewport’s View, not the Titleblock. If you find your View Title family in the Family Browser and edit the family, you will see when you select the Label that it allows you to select parameters that belong to the View category.
image

And see here marked up in bright green on your screenshot, you can see the View’s Associated Level is what is populating your View Title.

You can get the parameter values for the Type & Associated Level of the view:

What I am gathering now though, is that you wish to take these values to essentially populate a list of the drawings on the sheet to fill in the “Titulos” parameter that belongs to the sheet… Is this a Shared Parameter? If so, what is its storage type (Text or Multi-line text)?

I think what @Expedito_Deusdara is getting at is that a project may have multiple viewport types with different naming parameters. So while he can the parameters from the view, he doesn’t necessarily know which parameters he needs because they may vary.

So far I haven’t found a way to get the Title value. You’d have to get the Viewport Type, find the Title Type it uses, then open that Title Family in family editor and read the label parameters.

Or if you already know the Title Types used in the project, you could create a dictionary with the parameters and naming convention for each type.

Oops! Thanks @Nick_Boyts I was missing the big picture here :sweat_smile:

(I don’t think there is a way around this for the time being, it seems as if the API treats Labels in families as if they were Text Notes, and you’re only able to pull the “Sample Text Value” from it as their text contents.)

Hi @Expedito_Deusdara @Nick_Boyts @awilliams

Use BuilitinParameter in this case.

This workflow could also help:

I’m working in several projects with hundreds of sheets; each sheet may have several views with different tags (formula naming).

My sheet title block has a multiline parameter where I write the text tag of each viewport. (if exist, because some viewport hasn’t text tag)

To automize the process, a script reads each type of view (Modelical.Views), combines its parameters and writes the combined value to the parameter Title on Sheet of each viewport.

After that, another script reads the parameter Title on Sheet of each viewport placed on each sheet and records the list in a multiline parameter. Then, I need, at this moment, to perform two processes to complete the task.

Due to the large quantity of views and sheets, the process becomes slow, needing verification for correction of errors.

If I can read the value of the viewport tag, the process would be shorter and would produce most accurate results.

How many different Viewport Types do you have? I still think the only way to get non-standard view names will be to create a dictionary with the parameters used for each View Title type.

1 Like

@Expedito_Deusdara Could drop your dummy rvt file with different viewport types.

A standard model has around 12 viewport types (view level, sector view, detail, key map, partial section, section, detailing, external elevation, isometries etc.). Our view classification system uses alphanumerical codes for each specialty (architecture, interiors, concrete structure, metal structure, security etc). Each view type has one especific viewport tag with especific naming rule. Unfortunately RVT file is larger than the forum upload limit.

Example:
View name - 04.01 001 (Group architecture, subgroup interiors, view number 001)
View type - PLANTA BAIXA
Level – PAVIMENTO 1(Level name)
Scope box – GERAL (Scope box name)

Result:
Viewport tag - PLANTA BAIXA GERAL PAVIMENTO 1(View type+scope box name+Associated Level)

View name - 04.02 002 (Group architecture, subgroup fabrication, view number 002)
View type – DETALHAMENTO (Drafting view)
Drafting view name – DETALHE EXAUSTOR
Result:
Viewport tag – DETALHE EXAUSTOR (Drafting view name)