Eagle command language contains the ADD function but not loops. Eagle ULP contains loops but no function to add a component. Under these circumstances, how does one add components e.g a lot of LEDs into a schematic using a loop?
How to add components using loop in Eagle PCB script
eagle
Related Topic
- Electronic – How to reset all part names in Eagle PCB
- Electrical – How to lock one (or more) layers in Eagle
- Electrical – Eagle PCB components do not match pin layout of actual components
- Electronic – Cannot move imported LTspice components in Eagle schematic
- Electronic – Centroid of component for pick and place machine using Eagle
- Electronic – Eagle Change all part names (Designator)
Best Answer
It is possible to use a ULP to execute editor commands, but only in a very non-obvious way: The built-in
exit()
function can be given a string that is executed immediately after the ULP has exited:See the file
cmd-draw.ulp
for a complete example.