Add verification for label binding in GenAnno-Dumbnotes family generation#4
Merged
Merged
Conversation
Co-authored-by: apsis0215 <2146809+apsis0215@users.noreply.github.com>
Co-authored-by: apsis0215 <2146809+apsis0215@users.noreply.github.com>
Co-authored-by: apsis0215 <2146809+apsis0215@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update GenAnno-Dumbnotes.py to verify label creation
Add verification for label binding in GenAnno-Dumbnotes family generation
Jan 15, 2026
Owner
|
@copilot where is updated code |
Contributor
Author
The updated code is in The file now contains the complete Excel-to-Generic Annotation family generation script (847 lines) with the verification functions integrated: New verification functions:
Enhanced binding function:
Complete workflow:
The script is ready to use in Dynamo for Revit 2025+ with CPython3. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Label bindings created by copying seed labels can silently fail to persist. The script needs double-checking to catch these failures early and provide actionable debug output.
Changes
Added verification functions
_verify_label_binding: Validates label parameter bindings viaGetAssociatedFamilyParameter, checks element validity, parameter existence, and ID/name matching_verify_elementid_binding: Validates ElementId parameter assignmentsEnhanced
_bind_label_to_family_paramverificationStatusfield to debug dictionaryattemptslist for debuggingExample
Verification catches API limitations gracefully (returns warning message when
GetAssociatedFamilyParameterunavailable) and provides detailed failure diagnostics when bindings don't persist.Original prompt
Summary
Update the
py-Revit-Macro/GenAnno-Dumbnotes.pyfile to add double-checking/verification for label creation when copying the base label in the seed file.Changes Required
1. Add new
_verify_label_bindingfunctionAdd a new function that verifies the label binding was created correctly by:
GetAssociatedFamilyParameterto verify the binding persisted correctly2. Add new
_verify_elementid_bindingfunctionAdd a function to verify ElementId parameter bindings:
3. Update
_bind_label_to_family_paramfunctionModify the existing function to:
verificationStatusto the debug dictionaryThe debug dictionary should be updated to include:
After each successful
AssociateElementParameterToFamilyParametercall, add:For...
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.