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...
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'?
Here is an article on how to change the phase created parameter:
Does that help address your issue?
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.