pyrevitlabs/pyrevit/scheduling

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Schedules and quantities. Covers creating schedules, adding fields, filters, sorting and grouping, reading schedule contents, placing schedules on sheets, and preparing them for export. Use it for "make a door schedule", "count windows by type", "export the room schedule" and similar tasks.

Install

npx vskill@latest install pyrevitlabs/pyrevit/scheduling

SKILL.md

Scheduling

Read revit-scripting first. Check API names with lookup_revit_api.

Answering a quantity question

A run_query over the elements is usually more reliable and faster than building a schedule and reading it back. Build a schedule when the user wants one in the model.

Creating a schedule

python
cat_id = DB.Category.GetCategory(doc, DB.BuiltInCategory.OST_Doors).Id
schedule = DB.ViewSchedule.CreateSchedule(doc, cat_id)
schedule.Name = "Door Schedule"
definition = schedule.Definition
  • Other kinds: key schedules DB.ViewSchedule.CreateKeySchedule(doc, cat_id), material takeoffs CreateMaterialTakeoff(doc, cat_id), sheet lists CreateSheetList(doc).

Fields

python
fields = {}
for sf in definition.GetSchedulableFields():
fields[sf.GetName(doc)] = sf
mark = definition.AddField(fields["Mark"])
width = definition.AddField(fields["Width"])
  • Available fields: GetSchedulableFields() lists what can be scheduled for that category. Its display names are localized, so discover them in the active Revit session instead of hardcoding English labels.
  • Field ids: AddField returns a ScheduleField. Its FieldId is what filters and sorting use.
  • Order: fields appear in the order they are added.
  • Hiding a field: set field.IsHidden = True to keep it for filtering or sorting but not show it.

Filters, sorting, grouping, totals

python
definition.AddFilter(DB.ScheduleFilter(level.FieldId, DB.ScheduleFilterType.Equal, "Level 1"))
definition.AddSortGroupField(DB.ScheduleSortGroupField(mark.FieldId))
definition.IsItemized = False
definition.ShowGrandTotal = True
  • Grouping identical rows: definition.IsItemized = False merges rows with the same values; True lists every element.
  • Filter values must match the field's storage type: a string, a double in feet, an int, or an ElementId.
  • Headers and footers: grouping headers and footers are properties of ScheduleSortGroupField (ShowHeader, ShowFooter).

Reading schedule contents

python
table = schedule.GetTableData()
body = table.GetSectionData(DB.SectionType.Body)
rows = []
for r in range(body.NumberOfRows):
rows.append([schedule.GetCellText(DB.SectionType.Body, r, c) for c in range(body.NumberOfColumns)])
result = rows

The first body rows can be column headers, depending on the schedule's settings.

Placing on a sheet

python
DB.ScheduleSheetInstance.Create(doc, sheet.Id, schedule.Id, DB.XYZ(x, y, 0))
  • Sheet coordinates are in feet, measured from the sheet origin.

Exporting

Guarded agent runs block schedule exports. Prepare and verify the schedule in a run, then have the user export it from Revit after the run ends.

Before you report done

  • [ ] The schedule's rows, read back, match a direct element query of the same category and filters.
  • [ ] Its fields, filters, sorting and totals, read back from schedule.Definition, are the ones asked for.
  • [ ] capture_view(view="Door Schedule") shows how it looks.
  • [ ] You told the user the schedule's name and that it is ready to export from Revit.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/pyrevitlabs/pyrevit/scheduling/badge)](https://verified-skill.com/skills/pyrevitlabs/pyrevit/scheduling)

Something wrong with this skill or its page? Tell us.