Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Get phase (filter) of schedule

PieterL_TM
Advocate
Advocate

Get phase (filter) of schedule

PieterL_TM
Advocate
Advocate

How do I get the phase and phase filter of a ViewSchedule through the Revit API (is it even possible)?

The CreatedPhaseId always returns -1...

PieterL_TM_0-1701596586982.png

 

0 Likes
Reply
289 Views
3 Replies
Replies (3)

jeremy_tammik
Autodesk
Autodesk

You highlight the CreatedPhaseld property... is that the itm that you wish to access programmatically? If so, you can simply run RevitLookup in the debugger to see the exact API steps to retrieve the data. Or, are you referring to something different when you say 'phase (filter) of schedule'?

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

jeremy_tammik
Autodesk
Autodesk

Here is an article on how to change the phase created parameter:

  

https://thebuildingcoder.typepad.com/blog/2019/06/accelerator-dash-pattern-fix-element-rotation-and-...

  

Does that help address your issue?

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

studio-a-int
Advocate
Advocate

Assuming yourViewSchedule is the object (as ViewSchedule) that you are working with,
you can get/set the parameters you are looking for:

// Phase Filter
// Storage Type: ElementId
yourViewSchedule.get_Parameter(BuiltInParameter.VIEW_PHASE_FILTER).AsElementId();

// Phase
// Storage Type: ElementId
yourViewSchedule.get_Parameter(BuiltInParameter.VIEW_PHASE).AsElementId();

0 Likes