ViewTitle

ViewTitle

GonçaloFeio1321
Enthusiast Enthusiast
693 Views
3 Replies
Message 1 of 4

ViewTitle

GonçaloFeio1321
Enthusiast
Enthusiast

Hi

I am trying to get to the ViewPort view titles on sheets.

How can I access them?

 

Gonçalo Feio

0 Likes
694 Views
3 Replies
Replies (3)
Message 2 of 4

saikat
Autodesk
Autodesk

Hi:

 

You can use the following approach to get access to the name of a viewport on a view sheet. Before running this code, please select a specific viewport and then run the code in an external command.

 

<code_begin>

 

foreach

(Element ele incommandData.Application.ActiveUIDocument.Selection.Elements)

{

String name = ele.get_Parameter(BuiltInParameter.VIEW_NAME).AsString();

 

TaskDialog.Show("Name", name);

 

<code_end>

 

Hope this helps.

Saikat



Saikat Bhattacharya
Senior Manager - Technology Consulting
0 Likes
Message 3 of 4

GonçaloFeio1321
Enthusiast
Enthusiast

Thanks Saikat,

 

But that was not what I wanted.

I want to access the view title element itself to move it around.

I can already move views, but I am trying to reposition just the viewtitle.

Any help on that?

 

Thanks

0 Likes
Message 4 of 4

saikat
Autodesk
Autodesk

Hi:

 

Using the Revit LookUp tool (contained in the Revit SDK), i can see that the view titles can be filtered using Built-in Category called OST_ViewportLabel. And the element name is View Title. Can you try using this information and element filters to access the view titles on a given sheet. Let me know you have questions.

 

cheers

Saikat



Saikat Bhattacharya
Senior Manager - Technology Consulting
0 Likes