Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ViewTitle

3 REPLIES 3
Reply
Message 1 of 4
GonçaloFeio1321
632 Views, 3 Replies

ViewTitle

Hi

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

How can I access them?

 

Gonçalo Feio

3 REPLIES 3
Message 2 of 4
saikat
in reply to: GonçaloFeio1321

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
Message 3 of 4
GonçaloFeio1321
in reply to: saikat

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

Message 4 of 4
saikat
in reply to: GonçaloFeio1321

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report