Skip to content

Fix: #3109 load beta tools setting + Helpurl support improvement#3116

Merged
jmcouffin merged 6 commits intopyrevitlabs:developfrom
OnePowerUser88:3109-load-beta-tools-setting
Feb 21, 2026
Merged

Fix: #3109 load beta tools setting + Helpurl support improvement#3116
jmcouffin merged 6 commits intopyrevitlabs:developfrom
OnePowerUser88:3109-load-beta-tools-setting

Conversation

@OnePowerUser88
Copy link
Contributor

@OnePowerUser88 OnePowerUser88 commented Feb 19, 2026

Fix Load Beta Tools not applied after settings change

Description

Please provide a brief description of the changes introduced in this pull request. Explain the purpose of these changes and their intended effect on the project.

When "Load Beta Tools" is enabled in the settings menu, beta tools did not appear until Revit was restarted. The C# loader (6.1) read the load_beta setting only once when UIManagerService was created, so the value was cached for the whole session. After toggling the setting and reloading pyRevit, the same service instance was reused and kept using the old value.

This change re-reads the Load Beta setting at the start of each BuildUI() call, so every reload uses the current config and beta tools show or hide correctly after changing the setting.


Checklist

Before submitting your pull request, ensure the following requirements are met:

  • Code follows the PEP 8 style guide.
  • Code has been formatted with Black using the command:
    pipenv run black {source_file_or_directory}
  • Changes are tested and verified to work as expected.

Note: This PR only touches C# (.cs) files; PEP 8 and Black do not apply. Beta config parsing is covered by existing tests (e.g. TestLoadBetaConfigFromIni).


Related Issues

If applicable, link the issues resolved by this pull request:


Additional Notes

  • _loadBeta is no longer readonly so it can be updated at the start of each BuildUI(). The constructor still sets it from config for the first load.
  • Single file changed: dev/pyRevitLoader/pyRevitAssemblyBuilder/UIManager/UIManagerService.cs.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request aims to fix issue #3109 where beta tools did not appear after enabling the "Load Beta Tools" setting until Revit was restarted. The root cause was that the C# loader (version 6.1) cached the load_beta config value in the UIManagerService constructor, preventing it from being updated when users toggled the setting and reloaded pyRevit.

However, this PR contains changes to two files, not one as stated in the description:

Changes:

  1. Fixed _loadBeta caching in UIManagerService by re-reading the config at the start of each BuildUI() call (resolves #3109)
  2. Added unrelated ExtensionParser.cs changes for layout strict allowlist and help file auto-discovery (not mentioned in PR description)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
dev/pyRevitLoader/pyRevitAssemblyBuilder/UIManager/UIManagerService.cs Removed readonly from _loadBeta field and added config re-read logic in BuildUI() method to pick up setting changes on reload
dev/pyRevitLoader/pyRevitExtensionParser/ExtensionParser.cs Unrelated changes: Removed code that appended unlisted children to layout, added help file auto-discovery, template substitution for help URLs, and relative path resolution for help files

jmcouffin
jmcouffin previously approved these changes Feb 21, 2026
@jmcouffin
Copy link
Contributor

jmcouffin commented Feb 21, 2026

@OnePowerUser88
Thanks for this contribution

Note:
When you touch C# you need to build and add the dlls so that all the latest changes are available for people using the Clone function in the CLI

@jmcouffin jmcouffin changed the title 3109 load beta tools setting Fix: #3109 load beta tools setting + Helpurl support improvement Feb 21, 2026
@jmcouffin jmcouffin self-assigned this Feb 21, 2026
@jmcouffin jmcouffin added the Enhancement Enhancement request [class->Improved #{number}: {title}] label Feb 21, 2026
@jmcouffin jmcouffin merged commit 1197c91 into pyrevitlabs:develop Feb 21, 2026
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1321-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1321-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1323-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1323-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1326-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1326-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1330-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26052+1330-wip

@OnePowerUser88
Copy link
Contributor Author

@OnePowerUser88
Thanks for this contribution

Note:
When you touch C# you need to build and add the dlls so that all the latest changes are available for people using the Clone function in the CLI

I fugured as much, but was not entierly confortable with how I should commit the dlls correctly. Should have mentioned it in my PR. Will figure that part for next time (or ask for spesific guidance when I'm faced with it 🤪)

@jmcouffin
Copy link
Contributor

I figured as much, but was not entierly confortable with how I should commit the dlls correctly. Should have mentioned it in my PR. Will figure that part for next time (or ask for spesific guidance when I'm faced with it 🤪)

No pb at all @OnePowerUser88
No judgement or critic.
It is not strictly documented anyway and should...

Basically, you can build dlls using

pipenv run pyrevit build labs
pipenv run pyrevit build products 

with or without the Debug flag depending on your needs
then commit it in your PR when all automated reviewed are done (Copilot or devloAI ones)
chore: update binaries for the commit message

@OnePowerUser88
Copy link
Contributor Author

Thanks, no offence/judgement taken, I'm just new and need to some of this workflow, and happy for any guidance!

I also had to resolve a pipenv version mismatch when i tested on my end, that also made me unsure if I had done things correctly. So I was more confident in the .cs file changes than my compiling.

Does https://docs.pyrevitlabs.io/dev-guide/#debugging-code cover what to do fully for working with the C# code and compiling for PRs?

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2054-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2054-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2111-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2111-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2115-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2115-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2121-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2121-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2123-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26055+2123-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26057+1645-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26057+1645-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26057+2022-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26057+2022-wip

@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26058+1619-wip

1 similar comment
@github-actions
Copy link
Contributor

📦 New work-in-progress (wip) builds are available for 6.1.0.26058+1619-wip

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1027-wip

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1027-wip

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1126-wip

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1126-wip

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1139-wip

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1139-wip

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1233-wip

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1233-wip

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1244-wip

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1244-wip

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1357-wip

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1357-wip

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1403-wip

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

📦 New work-in-progress (wip) builds are available for 6.1.0.26061+1403-wip

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

Labels

Enhancement Enhancement request [class->Improved #{number}: {title}]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Load Beta Tools no longer working with new launcher 6.1

4 participants