Skip to content

.tsv-based reflection mechanism migrated to BHoM_Engine - #564

Open
pawelbaran wants to merge 1 commit into
developfrom
BHoM_UI-#563-ExtendTsvReflection
Open

pawelbaran wants to merge 1 commit into
developfrom
BHoM_UI-#563-ExtendTsvReflection

Conversation

@pawelbaran

@pawelbaran pawelbaran commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

NOTE: Depends on

BHoM/BHoM#1724
BHoM/BHoM_Engine#3596

Issues addressed by this PR

Closes #563

Recommended review process:

The PR is a byproduct of my investigation of the topic as explained in #563. It is not fully finished, there was quite a few copy-paste actions, todos left etc., so more work required, but the intent is hopefully clear. The code works (.tsv processing, loading scripts, RunExtensionMethod, dynamic assembly load), the only feature that does not fully work is ctrl+shift+b due to the fact that ItemByKey method is not fully finished.

Recommended sequence to review, with key points mentioned:

  1. Migrated oM objects to BHoM:
    • put in Base_oM\Reflection, but this is a placeholder, happy to move somewhere else
    • Json prop removed from CodeElementRecord class
    • CodeElementType enum items changed to be more focused on actual reflection
  2. Migrated the code from BHoM_UI to BHoM_Engine:
    • AssemblyResolver class moved to BHoM_Engine\Objects (code unchanged)
    • most of the code was put in BH.Engine.Base.Objects.Initialisation - please treat it as a placeholder, I put it together under one class to make it easier to review - main changes compared to the original BHoM_UI code are around input parameters
    • Query.CodeElements method and its dependencies migrated to Reflection_Engine because it depends on methods from that project - the method itself has been simplified to align with the new version of CodeElementType enum, also try/catches added etc.
    • new addition: BH.Engine.Base.Query.ItemByKey method that allows to find a member based on a key (the key is the same or almost the same as keys used in versioning), to replace JSON deserialisation - the method is not finished yet, just proves the concept by reflecting types and non-Create methods
  3. BHoM_UI:
    • lots of files deleted altogether (most migrated to BH.Engine.Base.Objects.Initialisation and Reflection_Engine in untouched state)
    • BH.UI.Base.Global.Initialisation class refactored heavily: many methods moved out to BH.Engine.Base.Objects.Initialisation and made more parametric, what is important is that the flow of Activate method stayed untouched
    • SearchItem, SearchMenu, ItemSelectorMenu aligned with the new oM (no Json property, changed enum)
  4. Revit_Toolkit - Initialisation class leveraging the changes listed in points 1. to 3.:
    • no dependency on BHoM_UI
    • combine CodeElementRecords from the base .tsv with a dedicated set and .tsv - possible thanks to more parametric design of the code

Testing

For now I would not obsess about functionality, because code principles are more relevant. However, if you'd like to verify the concept overall, then follow this sequence:

  1. Compile the PRs (remember about Grasshopper_UI!)
  2. Remove AssemblyContents.tsv file from BHoM\Resources folder (schema changed) - for now this step is required, but if we decide to merge this PR, we'll need to change the default .tsv path to protect the users
  3. Open GH, check if AssemblyContents.tsv is being created
  4. Restart GH, check if the .tsv file is picked up
  5. Open an existing Grasshopper script and see if everything is OK
  6. Try running RunExtensionMethod (e.g. by passing a line and Length as method name)

Changelog

Additional comments

Consolidation of CodeElementType enum could go even further, so that methods from all 5 classes would land under 1 value, for the UIs to dispatch them at runtime - this, however, would mean that we'd need to query strings every time the information about declaring type is needed. I did not dare to do it in the 1st iteration, but still on my hitlist to try and see how it lands.

@bhombot-ci

bhombot-ci Bot commented Sep 17, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 105106002302 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 18, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 105499252952 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 19, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 105859032505 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 20, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 106033165149 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 21, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 106233189129 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 22, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 106640283312 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 23, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 107074640056 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 24, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 107516684104 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 26, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 108351393197 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 27, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 108563893308 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 28, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 108808408103 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 29, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 109280234333 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Sep 30, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 109776413237 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 1, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 110265717855 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 2, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 110736883091 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 43 additional annotations waiting, made up of 43 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 3, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 111154356641 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 4, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 111379134823 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 5, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 111643806131 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 6, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 112149739240 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 7, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 112666036716 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 8, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 113173961163 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 9, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 113708176112 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 10, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 114156076603 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 11, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 114402894788 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 12, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 114682867721 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 13, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 115175072866 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 14, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 115705218607 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 15, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 116272559131 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 16, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 116850459273 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 17, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 117332428094 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 20, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 118833349179 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 22, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 119743091012 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 23, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 120410418572 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

@bhombot-ci

bhombot-ci Bot commented Oct 24, 2026

Copy link
Copy Markdown

Please be advised that the check with reference 120824707702 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 45 additional annotations waiting, made up of 45 errors and 0 warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:WIP PR in progress and still in draft, not ready for formal review type:feature New capability or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the .tsv-based reflection system more flexible

1 participant