Vis Automations · In-app tool, Automation Scripts menu
Fastener Stacks
Finds every fastener in an assembly, groups touching fasteners into stacks, groups identical stacks into families, and shows each family as a colored Vis group you can select.
Verification passing on Vis 2606.0 build 26134 + 2606.2610 · 2026-10-29 · repo tc-vis-automation 9f1b0af · Goals 1 to 6 verified from inside Vis and headless (16/16); the bonus goals are not started.
Three files from the repo, kept side by side in one folder: inapp/fastener_stacks_panel.py (the menu entry), inapp/fastener_stacks.py (the logic) and its rules, inapp/fastener_stacks.json. Needs Vis 2606 (see Install) and Python with pywin32 and tkinter.
Add it to the Automation Scripts menu (EXERCISED)
- Open ☰ Menu › Automation Scripts › Manage Scripts...
- Right-click the Automation Scripts root and choose New Script.
- Script Type Python, Browse to
fastener_stacks_panel.py, Apply, OK. - ☰ Menu › Automation Scripts › fastener_stacks_panel.py opens the panel.
Add it once: the entry stays after Vis restarts. Use New Script, not Load: Load expects a profile XML, and pointing it at a .py gives “Error in loading script profile file”. Do not press Enter in that dialog (see Traps).
Use it
- Open the assembly in Vis, then press Analyze model (about 2 minutes on the wing flap).
- Pick one fastener instance in Vis, then Select stack or Select group. Pick the instance, not a body: a body raises a modal error that blocks every later call.
- Clear removes the tool’s groups and restores the original materials.
From a shell while Vis is open
python inapp/fastener_stacks.py analyze python inapp/fastener_stacks.py select-stack python inapp/fastener_stacks.py select-group python inapp/fastener_stacks.py clear
Headless test
python tools/test_fastener_stacks.py --model <assembly.jt>
Close Vis first: the test starts its own and refuses to run if one is open.