Script Author: Ian Rivard

 

Description:

Manages FEMAP user commands and the Engineering Tools toolbar. Five operations: export user commands to a file, import them back, clear all user commands, remove orphaned commands whose API path is broken, and (NEW in v1.01) re-map dangling toolbar buttons that reference renamed or removed user-command titles.

 

Use Instructions:

Run the tool. Choose your operation:

  • 1 — Export: Saves your current user commands to a text file you can hand to a colleague or restore later.
  • 2 — Import: Reads a previously exported file and registers those commands in your FEMAP.
  • 3 — Clear all: Removes every user command in your FEMAP. (Destructive — export first if you want a backup.)
  • 4 — Remove orphans: Walks the user-command list, removes any whose stored API path no longer exists on disk. Useful after re-organizing your tools folder.
  • 5 — Re-map orphan toolbar references (NEW): Solves the “User Command X is not defined” complaints when customizing toolbars. Saves your toolbar layout to XML, scans for buttons whose Caption no longer matches a current user-command title, and prompts you per-orphan with a smart-suggested re-map (exact match / token-subset / Jaccard similarity) and an alphabetized ListBox of every current user-command title. Pick “Apply suggestion,” “Use list pick,” “Remove,” or “Skip” per orphan, or click Cancel to abort processing the rest. Always backs up your toolbar layout to %TEMP% first.

 

 

Requirements:

None beyond an open FEMAP session. Option 5 requires MSXML2.DOMDocument (ships with Windows).

 

Notes & Example (Option 5 walk-through):

If you renamed a tool from “Make Group of Whole Model” to “Whole Model Group” in a previous Engineering Tools install, a toolbar button still tries to reference the old title and FEMAP shows “User Command X is not defined.” Run Option 5: it surfaces the orphan, suggests “Whole Model Group” as the closest match (token-subset heuristic), and offers to apply. After all orphans processed, the layout is reloaded and the toolbar entries resolve cleanly.

 

Advanced Users:

Decisions are cached per orphan caption, so duplicate references only prompt once. The XML re-write hooks the Caption attribute on each button (per FEMAP API doc, feAddToolbarSubmenuUserCommand resolves user commands by cmdTitle on layout load).

To our users: We appreciate feedback on our tools and encourage you to modify them to your specific needs. If you make an improvement you feel would be valuable to others, please submit it through our contribution page.