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: 

Get phase (filter) of schedule

3 REPLIES 3
Reply
Message 1 of 4
PieterL_TM
302 Views, 3 Replies

Get phase (filter) of schedule

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

 

Labels (2)
3 REPLIES 3
Message 2 of 4
jeremy_tammik
in reply to: PieterL_TM

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
Message 3 of 4
jeremy_tammik
in reply to: PieterL_TM

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
Message 4 of 4
studio-a-int
in reply to: PieterL_TM

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();

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

Post to forums  

Autodesk Design & Make Report