- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have finished one project and would like to add my custom font from PCB DOS because it looks more professional and it is more nice that EAGLE have build in.
So i need example script that takes in Board Editor names and values of components and replace it with my defined font or wires in my ulp script that i draw manually or to use external .ttf file that generates then font.
For example, i have two resistors in Board Editor, when i run font_change.ulp script i need to get R1 and R2 (name of components), and then search in ulp script that names and put from script that names to resistor position like it original was but with different font.
Can you please give me example ulp script that do that? I will then update font style with wires in that script manually after that is done correctly.
I try to get all name values of components and this is working:
board(B) {
B.elements(E) dlgMessageBox(E.name, "Ok");
}
So i got two message box with values R1 and R2. Now i could not know how to add case with custom defined font in that ulp file and replace R1 and R2 on resistor name with my custom font?
So i need like this:
switch(E.name):
case "R1":
LINE 10, 20, 16, 23, 0.254
LINE 12, 24, 12, 21, 0.254
break;
case "R2":
LINE 11, 26, 17, 22, 0.254
LINE 13, 25, 13, 29, 0.254
break;
}
Then replace R1 on resistor name with above lines.
Solved! Go to Solution.