Skip to content

BL_ parameters: keep formulas, flag stale manual values - #29

Merged
robDL89 merged 3 commits into
mainfrom
claude/bl-params-fixes
Oct 22, 2026
Merged

robDL89 merged 3 commits into
mainfrom
claude/bl-params-fixes

Conversation

@robDL89

@robDL89 robDL89 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Two fixes to the family dimension parameters (#28), before 0.3.0.

BL_ parameters used in formulas. Re-baking a family removed every BL_ parameter that no longer arrived or had changed type. Checked live in Revit 2025: when one is used in another parameter's formula, RemoveParameter does not throw, it silently empties that formula. Such a parameter is now kept, a BL_ parameter with a formula of its own is not overwritten (Set was accepted and ignored there; IsDeterminedByFormula reads false, so the formula text is checked), and the bake note says which ones were left alone. The project types only get the values written in the family.

Values set by hand after a reshape. A value set from the selection is frozen; after a reshape, or on a Shift+D copy edited afterwards, it described a shape that was gone. The object's dimensions are recorded with each value: when they change the panel shows a warning and the family bake message names the object. The value is still sent.

Tests: BakeParameter.IsUsedIn (xUnit), changed_since (pytest), new smoke_bake section (set in Edit Mode, copy, reshape, panel warning, clear). Apply's logic run live in Revit 2025 on a temporary family: formula kept, own formula untouched, stale unused parameter removed.

🤖 Generated with Claude Code

rdarch-admin and others added 3 commits October 22, 2026 17:31
Re-baking a family removed every BL_ parameter that no longer arrived or
had changed type. When one was used in another parameter's formula,
RemoveParameter did not throw: Revit silently emptied that formula
(checked live in Revit 2025). Such a parameter is now kept as it is, and
a BL_ parameter with a formula of its own is no longer written over. The
bake note says which ones were left alone, and the project types only get
the values actually written in the family.

IsDeterminedByFormula reads false on a parameter with a formula, so the
formula text is checked instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A value set by hand from the selection is frozen: after a reshape, or on
a Shift+D copy edited afterwards, it kept describing a shape that was
gone, with nothing to say so. The object's dimensions are now recorded
with each value; when they change the panel shows the value with a
warning and the family bake message names the object. The value is still
sent: setting it again or clearing it is the user's call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Blender 4.2 and 4.5 obj.dimensions is not updated in Edit Mode after
a reshape, so a value measured there recorded the old dimensions and was
flagged as soon as the user left Edit Mode (caught by CI). The recorded
dimensions are now computed from the evaluated mesh, and nothing is
flagged while in Edit Mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robDL89
robDL89 merged commit 85d9a31 into main Oct 22, 2026
14 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.

2 participants