Skip to content

sheets: list parameters and filter sheets by them (--where/--params/--csv) - #248

Merged
mahach666 merged 4 commits into
mainfrom
feat/sheets-where-params
Nov 16, 2026
Merged

mahach666 merged 4 commits into
mainfrom
feat/sheets-where-params

Conversation

@mahach666

Copy link
Copy Markdown
Collaborator

Port rvt-prt list --params/--where (Unreleased after 0.1.0).\n\n- SheetRecord.Parameters: text and whole-number project/shared params as display strings (units stay out); SHEET_SCHEDULED as Appears In Sheet List Yes/No.\n- SheetFilter: NAME=VALUE / NAME!=VALUE / NAME~TEXT, wildcards * ?, case-insensitive, Yes/No aliases true/false/1/0.\n- rvtio sheets --where (repeatable, AND), --params (stderr listing), --csv (CSV output), --json (default). Misspelt name or empty match exits 1.\n- Docs: docs/sheets.md, docs/public-api.md, README. Tests: SheetFilterTests (5). Build + SheetCatalogTests/SheetsCommandTests/SheetFilterTests green on net8/net10.\n\nSource: https://github.com/puzzbobb/rvt-prt (CHANGELOG Unreleased, docs/usage.md#choosing-sheets-by-their-parameters, docs/how-it-works.md model/sheetparams.py). No Autodesk code.

…-csv)

Port rvt-prt list --params/--where (Unreleased after 0.1.0): SheetRecord.Parameters (text/integer project/shared params, SHEET_SCHEDULED as Appears In Sheet List Yes/No), SheetFilter (NAME=VALUE/!=/~, wildcards, Yes/No aliases), SheetsCommand --where/--params/--csv/--json, docs + SheetFilterTests.
Verified against racadvancedsampleproject.rvt 2027 (2 real sheets): built-in integers such as ELEM_CATEGORY_PARAM leaked into Parameters/CSV. Keep positive-id (user) params plus Appears In Sheet List, as documented. Adds SkipsBuiltinNonSheetParams test.
Review #248: Sheet Number 1 matched =true, Sheet Name true matched =1. SheetRecord.YesNoParameters now marks Yes/No params (Appears In Sheet List, user params of Yes/No kind via IsYesNo definition, boolean Forge spec, or boolean value); SheetFilter applies true/false/1/0 aliases only to those, every other field compares literally. Tests cover literal behavior on number/name/text params, bool-spec user params, and builtin non-sheet exclusion.
Recheck #248: Yes/No aliases failed when the filter named the parameter in another case than the plain YesNoParameters array (Issued=true worked, issued=true and ISSUED=1 did not). The record now stores the names in an OrdinalIgnoreCase set and IsYesNoParameter compares explicitly, matching Lookup and the filter contract. Regression test builds a record from a plain array and filters it in mixed case.
@mahach666
mahach666 merged commit e42eb0d into main Nov 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant