AssemblyTextPrep not working with a single sided board
Hello @RnDMonkey ,
I'm currently testing your script 'AssemblyTextPrep' on one of our projects but I think I've found a little bug in it.
The test is on a board with components on Top layer only.
The PCB is already populated with ".Designator" texts on Mech layer 25 because, in my setup, M25/M26 is the pair used to put RefDes (function "Designator").
At starts, the script pops an error: "Couldn''t determine top assembly layers from existing components or mech layer pairs:".
After a quick look into the code, it looks like the MLP.PairDefined(ASSY_LAYER_BOT, MLS.GetMechanicalLayer(i).LayerID) function doesn't do what we expect from it:
- 'ASSY_LAYER_TOP' is correctly set
- The script looks for a corresponding 'ASSY_LAYER_BOT'
- But it doesn't find any (
ASSY_LAYER_BOT := MLS.GetMechanicalLayer(i).LayerID;is never reached) - And ends with an error
I wonder how it's even possible! Do you have any idea to fix this?
As soon as I put a component on the Bottom side, the script starts correctly.
--
Side note: the name of the Mech layers are reported incorrectly:
In my case it should have been "Mechanical Layer 25", instead of "Inner Layer 24".