Closed general

fusion_show_attributes: show a component's metadata (device editor > variant ... > Attribute Sets), found by driving Fusion with ab

John Lauer · 1mo ago ·closed by John Lauer

How to SHOW a component's metadata (attributes) in Fusion Electronics, found by driving Fusion with ab desktop verbs on ConfRoomROG, 2026-09-20. John wants this as a first-class verb ("show me the metadata for this component") for demo clips and for any AI asked where the part numbers live.

Path that works today (library open, e.g. Adom_ToF.lbr):

  1. fusion_electron_run {command:"EDIT VL53L8CX.dev", confirm:"no"} - opens the DEVICE editor: symbol canvas, Variants panel (Component Properties, Packages table with the Mapped check), footprint + 3D package previews. No dialog, no click. This is also the Fusion "ganged-up view" (symbol + footprint + 3D chip in one frame).
  2. In the Packages table, the variant row has a "..." button at its right edge. Click it -> popup menu: Connect, Delete, Rename, Replace Package, Edit Footprint, Add Package, Add Package from Web, Attribute Sets.
  3. Click Attribute Sets -> modal "Variant Attributes" (Qt683QWindowIcon, shows up in fusion_state.dialogs[] with its hwnd): table Attributes x DEFAULT with ADOM_WIKI, DATASHEET, DIGIKEY_PN, LCSC_PN, MANUFACTURER, MOUSER_PN, MPN. Close with desktop_ui_click {hwnd, name:"Cancel", role:"button"} (UIA works on this dialog; fusion_state then reports 0 dialogs).

What is and is not addressable:

  • Fusion's main window exposes ~174 UIA nodes; the right-hand dock (Variants / Inspector / Layers / Selection tabs), the Packages table and the "..." button are ONE opaque Qt group: no UIA children. Steps 2-3 therefore need positioned clicks: desktop_screenshot_window {hwnd} -> desktop_click {hwnd, space:"image", shotId, x, y, cursor:false} (focus-then-click inside ab, no math). At 1400x752 window-image scale: variant "..." at ~(1376,281), "Attribute Sets" at ~(1305,475) in the following full-screen shot.
  • fusion_click_fusion is listed in adom-bridge commands but answers "No handler in this exe owns the verb 'click_fusion'"; either restore it (ideally a posted, non-foreground click) or drop it from the contract.
  • The second dock tab is the INSPECTOR ("Nothing Selected"), not attributes.

Asks:

  1. fusion_show_attributes {libraryPath, deviceset, variant?, capture}: do steps 1-3 in-process (the add-in can call the same command the menu item fires, or read technologies/attributes and render them), return the attributes as JSON plus a frame, and close the dialog itself. fusion_library_parts already has the data offline; this verb is the ON-SCREEN proof.
  2. Widen the DEFAULT column before capturing: the URL and part-number values are truncated at the default width.
  3. desktop_record_window_start {hwnd} on the main window does not include the owned "Variant Attributes" dialog; say so in the verb hint and return the dialog hwnd so the caller can record that window instead.

2 Replies

John Lauer · 1mo ago

Status as of 1.10.30 (insiders). Part of this is shipped, part is not, so I am leaving it open.

Shipped

  • fusion_show_attributes {libraryPath, deviceset, capture} opens the device editor for the deviceset (EDIT <name>.dev, no dialog, no click) and returns a frame of it plus every variant's attributes as JSON, read straight from the library file. Verified on AdomLapper: VL53L5CX from Adom_ToF.lbr, frame shows the component view, reply lists the variant. Note that Adom_ToF.lbr carries zero <attribute> elements today, so its list is truthfully empty. That is a library content gap, not a verb gap: fusion_library_parts says the same.
  • fusion_click_fusion no longer dead-ends. It answers verb_retired with useInstead and the exact ab recipe (desktop_ui_click by name, or desktop_screenshot_window then desktop_click in image space). Same for fusion_send_key, fusion_screenshot_all and the other names the Python sidecar used to own. fusion_check_dialogs, fusion_dismiss_recovery, fusion_relocate_recovery and fusion_close are handled by the exe again. The skills no longer teach the retired names.

Not shipped

  • Opening Fusion's own "Variant Attributes" modal in-process, widening its DEFAULT column, and closing it. The "..." button and the Packages table are one opaque Qt group with no UI Automation children, so it needs positioned clicks, and I have not found a text command that fires the menu item. The reply carries the positioned-click recipe rather than pretending. Next step is to look for the command id in fusion_list_text_commands on a box signed into the adom.inc hub.
  • Ask 3 (recording does not include the owned dialog, return the dialog hwnd) belongs to ab's desktop_record_window_start. fusion_state.dialogs[] already returns the dialog hwnd, which is the window to record.
John Lauer · 1mo ago

Done in 1.10.34 (insiders), verified on AdomLapper with VL53L8CX from Adom_ToF.lbr.

The dialog, with no positioned clicks. EAGLE's ATTRIBUTE command, run in the device editor, raises Fusion's "Variant Attributes" table directly. fusion_show_attributes now does the whole thing in one call: EDIT <name>.dev, capture of the device editor, ATTRIBUTE, read the table through UI Automation, capture the dialog's own window, Cancel. fusion_check_dialogs reads 0 afterwards. dialog:false skips the table.

Ask 2, the truncated DEFAULT column. Not widened, and no longer needed for data: variantAttributesDialog.text is the table read by UI Automation with full values, and attributes carries them from the file. The dialog screenshot still shows Fusion's truncated column, which is what Fusion draws.

A real bug this turned up. My earlier comment here said Adom_ToF.lbr carries no attributes. That was wrong. Fusion-authored libraries store part numbers as layered <att_values> (deviceset, then device) plus named <att_set>s, not EAGLE's <technology><attribute>, and the parser only knew the EAGLE form. So fusion_library_parts and this verb reported such libraries as having no MPN or distributor numbers. Both dialects are read now. For VL53L8CX the reply carries ADOM_WIKI, DATASHEET, DIGIKEY_PN, LCSC_PN, MANUFACTURER, MOUSER_PN and MPN.

Ask 3, recording. Still ab's to fix in desktop_record_window_start. The reply's recording note gives the working recipe: run with dialog:false, fire ATTRIBUTE yourself, and record the dialog's own hwnd from fusion_state.dialogs[].

Closing. This is on insiders; public is 1.10.33 and gets it with the next promotion.

John Lauer closed this · 1mo ago

Log in to reply.