Closed bug report

altium_demo 2D board beat: PCB:SwitchTo2D fails (ok:false after ~2 min) but the beat reports success with failedSteps:[]; the 2D shot is a 3D render

MartyPM · ·closed by Colby Knox

altium-bridge 0.2.102 · Altium Designer Develop, licensed (ADDevelop, PrefFolder Version=26.11.1.5) · Windows 11

Summary. altium_demo {stage:4} (the 2D board beat) answers success:true with failedSteps:[], but its PCB:SwitchTo2D step returned ok:false with ms:null after ~2 min. The board stays in 3D, so the "2D board" screenshot is a 3D render. Stage 5's 3D screenshot is pixel-for-pixel the same frame.

Context. Stage 2 had just run PCB:SwitchTo3D on Spirit_Level_Project.PcbLib. Stage 4 then opened Bluetooth_Sentinel.PcbDoc fresh from disk, and it opened in 3D.

Reply, trimmed:

{"status":"ok","success":true,"label":"2d_board","failedSteps":[],"durationMs":141792,
 "steps":[{"open":"C:/Users/Public/Documents/Altium/AD26/Examples/Bluetooth Sentinel/Bluetooth_Sentinel.PcbDoc","ms":10951,"result":{"ok":true,"kind":"PCB","shown":true}},
          {"process":"PCB:SwitchTo2D","params":"","ok":false,"ms":null},
          {"process":"PCB:Zoom","params":"Action=All","ok":true,"ms":154}]}

Two problems:

  1. PCB:SwitchTo2D hangs or fails right after a fresh PcbDoc open. The same ~120 s stall as the lib_select report: the command goes out while the newly opened document is still loading.
  2. A failed step doesn't fail the beat. A step with ok:false isn't counted in failedSteps, and the beat reports success:true, so the caller narrates "the layout in 2D" over a 3D picture.

Also (minor). PCB:Zoom Action=All on this rigid-flex board leaves it small in the middle of the view in both the 2D and 3D beats (~15% of the view width).

Expected. The board ends up in 2D. If it can't, failedSteps:["2d_board"] and success:false.

1 Reply

Colby Knox marked this in progress ·
Colby Knox ·

Both fixed in altium-bridge 0.2.103, public now.

  1. The 2D beat ends in 2D. After an open that loads the board from disk, the bridge waits for Altium to finish with it before PCB:SwitchTo2D. On Altium Designer Develop 26.11.1 the switch then took 190 ms, and the frame was the 2D board.
  2. A failed step fails the beat. If a step such as PCB:SwitchTo2D doesn't complete, the surface answers success:false with errorCode: step_failed and the step's own error. altium_demo then lists the beat in failedSteps (["2d_board"]), and the process in failedProcesses. A 3D picture can no longer come back as the 2D board.

Also: both board beats now fit the board rather than the whole drawing sheet (PCB:Zoom Action=Board), so the Bluetooth Sentinel fills the view instead of sitting small beside its stack-up table.

Reopen this if a beat on 0.2.103 still shows the wrong view.

Colby Knox closed this ·

Log in to reply.