Skip to content

[Bug]: C# Loader: splitpushbutton doesnt count against stack limit #2998

@jonatanjacobsson

Description

@jonatanjacobsson

✈ Pre-Flight checks

  • I don't have SentinelOne antivirus installed (see above for the solution)
  • I have searched in the issues (open and closed) but couldn't find a similar issue
  • I have searched in the pyRevit Forum for similar issues
  • I already followed the installation troubleshooting guide thoroughly
  • I am using the latest pyRevit Version

🐞 Describe the bug

Splitpushbuttons placed inside stacks, are not counted toward the stack's minimum item requirement. This causes stacks containing only splitpushbuttons to be skipped entirely, even when the stack has a valid bundle.yaml with explicit layout.

Splitpushbuttons do work, when placed directly in panels, but NOT when placed inside stacks.

The stack count was not really enforced in the previous loader it seems.

Broken example:

pyBS.tab/
  MMI.panel/
    col1.stack/
      200.splitpushbutton/
      300.splitpushbutton/
      400.splitpushbutton/
Image

Working example:

pyBS.tab/
  MMI.panel/
    200.splitpushbutton/
    300.splitpushbutton/
    400.splitpushbutton/
Image

⌨ Error/Debug Message

2026-01-09 08:44:00,276 DEBUG [pyrevit.loader.sessionmgr] Created or retrieved panel 'MMI' in tab 'pyBS'.
2026-01-09 08:44:00,276 DEBUG [pyrevit.loader.sessionmgr] Stack 'col1' has fewer than 2 items, skipping.

♻️ To Reproduce

No response

⏲️ Expected behavior

No response

🖥️ Hardware and Software Setup (please complete the following information)

PS C:\code\pyRevit Extensions\pyByggstyrning.extension> pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
main | Branch: "master" | Version: "5.0.1.25051+1323" | Path: "C:\Users\JonatanJacobsson\AppData\Roaming\pyRevit\pyRevitCopy"
master | Branch: "master" | Version: "5.1.0.25094+1131-wip" | Path: "C:\Users\JonatanJacobsson\AppData\Roaming\pyRevit-Master"
==> Attachments
Unnamed-363FBF8 | Product: "Autodesk Revit 2026" | Engine: DEFAULT (2712) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
Unnamed-363FBF8 | Product: "2025 First Customer Ship" | Engine: DEFAULT (2712) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
Unnamed-363FBF8 | Product: "Autodesk Revit 2024" | Engine: DEFAULT (2712) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
Unnamed-363FBF8 | Product: "Autodesk Revit 2023" | Engine: DEFAULT (2712) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
==> Installed Extensions
EF-Tools | Type: UIExtension | Repo: "https://github.com/ErikFrits/EF-Tools.git" | Installed: "C:\Users\JonatanJacobsson\AppData\Roaming\pyRevit\Extensions\EF-Tools.extension"
Nobel DCA Tools | Type: UIExtension | Repo: "" | Installed: "C:\code\Nobel Extension\NobelDCATools.extension"
pyArchitect | Type: UIExtension | Repo: "" | Installed: "C:\Users\JonatanJacobsson\AppData\Roaming\pyRevit\Extensions\pyArchitect.extension"
pyByggstyrning | Type: UIExtension | Repo: "https://github.com/byggstyrning/pyByggstyrning.extension.git" | Installed: "C:\code\pyRevit Extensions\pyByggstyrning.extension"
pyValidator | Type: UIExtension | Repo: "" | Installed: "C:\code\pyRevit Extensions\pyValidator.extension"
Rejlers-Tools | Type: UIExtension | Repo: "https://github.com/HNordstrom/Rejlers-Tools.git" | Installed: "C:\Users\JonatanJacobsson\AppData\Roaming\pyRevit\Extensions\Rejlers-Tools.extension"                                                                                                                                                                                     
revit-mcp-python | Type: UIExtension | Repo: "https://github.com/revit-mcp/revit-mcp-python.git" | Installed: "C:\code\IDS\revit-mcp-python.extension"
==> Default Extension Search Path
C:\Users\JonatanJacobsson\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
C:\code\IDS
C:\code\pyRevit Extensions
C:\Users\JonatanJacobsson\AppData\Roaming\pyRevit\Extensions
C:\code\Nobel Extension
==> Extension Sources - Default
https://github.com/pyrevitlabs/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2026 | Version: 26.0.10.8 | Build: 20250328_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2026\"
2025 First Customer Ship | Version: 25.0.2.419 | Build: 20240307_1300(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2025\"
Autodesk Revit 2024 | Version: 24.3.20.34 | Build: 20250402_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
Autodesk Revit 2023 | Version: 23.1.70.22 | Build: 20250410_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
==> Running Revit Instances
Error: Object reference not set to an instance of an object.
Run with "--debug" option to see debug messages

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug that stops user from using the tool or a major portion of pyRevit functionality [class]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions