Skip to content

Add project parameter extensions for Document#80

Draft
AleksandrFomenko wants to merge 2 commits into
Nice3point:mainfrom
AleksandrFomenko:feature/parameter-extensions
Draft

Add project parameter extensions for Document#80
AleksandrFomenko wants to merge 2 commits into
Nice3point:mainfrom
AleksandrFomenko:feature/parameter-extensions

Conversation

@AleksandrFomenko

Copy link
Copy Markdown

Summary of the Pull Request

What is this about:

Adds extension methods for working with project parameters bound in a document.

Description:

New extensions:

  • document.GetProjectParameterNames(ParameterBindingKind) — names of all bound project parameters, optionally filtered by binding kind (instance/type/any)
  • document.GetProjectParameterNames(BuiltInCategory, ParameterBindingKind) — filtered by category
  • document.GetProjectParameterNames(ForgeTypeId, ParameterBindingKind) — filtered by data type (Revit 2021+)
  • document.GetProjectParameterDefinition(string) — finds a project parameter definition by name

A new [Flags] enum ParameterBindingKind controls instance/type binding filtering.

The ForgeTypeId overload is gated behind #if REVIT2021_OR_GREATER; for 2019–2020 a ParameterType overload is provided instead. Category matching uses Category.BuiltInCategory on 2023+ and falls back to Id.IntegerValue on earlier versions.

Quality Checklist

  • [галочка)] My code follows the style guidelines of this project
  • [галочка)] I have performed a self-review of my own code
  • [галочка)] I have made corresponding changes to the documentation
  • [галочка)] My changes generate no new warnings

@AleksandrFomenko AleksandrFomenko marked this pull request as draft June 19, 2026 09:15
@AleksandrFomenko

Copy link
Copy Markdown
Author

😺

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