How can I create a ViewSchedule with only the elements of a ViewPort ?

How can I create a ViewSchedule with only the elements of a ViewPort ?

Bruno_Neves_Pires_Silva
Advocate Advocate
632 Views
4 Replies
Message 1 of 5

How can I create a ViewSchedule with only the elements of a ViewPort ?

Bruno_Neves_Pires_Silva
Advocate
Advocate

Hello, Folks.

 

   How can I create  a ViewSchedule with only the elements of a ViewPort ?

   I'm trying to create a ScheduleFilter, but until now I couldn't do it.

    I thought in creating first a ScheduleField with the type ScheduleFieldType.ViewBased, but what BuiltInParameter I would use ?

 

 

   Thank you in advance.

 

 

0 Likes
633 Views
4 Replies
Replies (4)
Message 2 of 5

aignatovich
Advisor
Advisor

Hi!

There is no schedule for viewports, but you can schedule model views.

Create schedule using ViewSchedule.CreateViewList method, add field with BuiltInParameter.VIEWPORT_SHEET_NAME and add filter for this parameter (it is enough to create filter rule for this value, that should begins with empty string)

Message 3 of 5

Bruno_Neves_Pires_Silva
Advocate
Advocate

Thank you, Aignatovich.

 

     But what I really need is a schedule for a specific viewport, there are many viewports in the sheet...

   

0 Likes
Message 4 of 5

jeremytammik
Autodesk
Autodesk

Dear Bruno,

 

Thank you for your query, and thanks to Alexander for his helpful suggestion.

 

Bruno, can you achieve what you need manually through the user interface?

 

How?

 

Have you analysed the resulting structure using RevitLookup?

 

If it is possible, then that should give you all the information required to recreate it programmatically.

 

Here is some advice on researching how to solve a Revit programming task:

 

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 5

RPTHOMAS108
Mentor
Mentor

From memory Schedules on a sheet are represented by ScheduleSheetInstance not ViewPort and have a property .ScheduleId.