As I wrote the biggest script for Altium Designer

 3r3187. 3r3-31. 15680 lines, ??? characters - exactly this size today is my script created inside Altium Designer - a system for developing printed circuit boards. 3r3174.  3r3187. 3r3174.  3r3187. As I wrote the biggest script for Altium Designer 3r3174.  3r3187.
3r3174.  3r3187. 3r3-300. Start
3r3174.  3r3187. It was 201? I worked as a design engineer, developed printed circuit boards. Military acceptance, design of complete design documentation (CD), normative control ESKD - all this makes Australian-Chinese-American software, which is the Altium system, tremble. Because they are alien to the Soviet guests, the old instructions and standards for the design of drawings. One employee of our department sometimes spent the whole work shift in order for the drawing of the board to satisfy all the norms and rules for the design of the design documentation. 3r3174.  3r3187. Now it is done in 10 minutes.
 3r3187. 3r3174.  3r3187. I decided that it was possible to simplify life for myself and for another ten people at work. I started to understand, I found that there is an open API, I began to look at examples and voila, my first script for Altium is already drawing a line on the board, there is no limit to joy. 3r3174.  3r3187. 3r3174.  3r3187. Little by little I was expanding my programming knowledge, because before that I hadn’t come across much of it, I remember a pendulum in the university I wrote for a semester and that's it. 3r3174.  3r3187. 3r3174.  3r3187. 3r3-300. First interface 3-3-3101. 3r3174.  3r3187. It got to the point that the interface had to be done, at the very beginning it was: 3r3174.  3r3187. 3r3174.  3r3187. 3r3174.  3r3187. 3r3174.  3r3187. This version already knew how to draw dimensions, callouts with arrows. 3r3174.  3r3187. 3r3174.  3r3187. It should be understood that there was no specific explanation in the documentation, nobody had any experience in using functions from the API either, only some 3r348. scripts
on githaba and standard altiumovskie. Description on the wiki to this day from the category:
 3r3187. 3r3174.  3r3187.
3r3355. SetState_Enabled method
(IPCB_Primitive interface) 3r3187. Syntax
Procedure SetState_Enabled (Value: Boolean); 3r3187. Description
Example
See also
IPCB_Primitive interface
3r3174.  3r3187. And the whole description, although by trial and error it was possible to determine how it works. 3r3174.  3r3187. 3r3174.  3r3187. Each new time, the introduction of new functions was enjoyable, because when you see how people use your work and everything turns out - that’s not why programs are being created. At this stage, the time for drawing up drawings has already been reduced almost by half. 3r3174.  3r3187. 3r3174.  3r3187. 3r3-300. Development 3r3-30101. 3r3174.  3r3187. The next version already looked like this:
 3r3187. 3r3174.  3r3187. 3r3174.  3r3187. 3r3174.  3r3187. She already knew how to insert sheets into the board, shade polygons for a drawing, insert a grid and other elements for a drawing. 3r3174.  3r3187. 3r3174.  3r3187. The main problem was that the Altium development environment is a system for developing printed circuit boards. It does not have enough tools to design a CD, and even more so according to Russian standards. Basically, scripting expanded the standard environment toolkit so that you could also develop a CD and print it out. 3r3174.  3r3187. 3r3174.  3r3187. For example, I inserted the insertion of sheets of different formats directly into the code, did not begin to make separate files. I applied excel tables for this, inserted a format file with my hands into the pcb file, selected all the properties of all the lines, their coordinates, widths, coordinates of texts, etc. and put it all in the usual array. Then, the script in turn created each of the formatting lines in the board file itself. And so for each sheet of all formats. 3r3174.  3r3187. 3r3174.  3r3187. 3r3-300. Our days
3r3174.  3r3187. Now the program looks like this: 3r3174.  3r3187. 3r3174.  3r3187. 3r3108. 3r3174.  3r3187. 3r3174.  3r3187. 3r3113. 3r3174.  3r3187. 3r3174.  3r3187. I have never been a designer, sometimes I had to sculpt buttons, I looked at the most famous CAD systems, how menus, settings, drop-down buttons and so on were made there. 3r3174.  3r3187. 3r3174.  3r3187. 3r3122.
Here is an example of the work of the script [/b] 3r3125. 3r3174.  3r3187. 3r3174.  3r3187. 3r3174.  3r3187. 3r3183. 3r3183. 3r3174.  3r3187. Total on board: 3r3r174.  3r3187. 3r3174.  3r3187. 3r3142.  3r3187. 3r3162. More than 50 settings, saving them inside the board file 3r3163.  3r3187. 3r3162. Updating drawings when making changes to the board 3r3163.  3r3187. 3r3162. Automatic insertion of species in the center of the sheet
 3r3187. 3r3162. PDF formation in one button
 3r3187. 3r3162. Editing dimensions with recalculation of deviations on the fly
 3r3187. 3r3162. Radial mesh, 4-sided mesh, risks, customizable pitch
 3r3187. 3r3162. Save sketches in txt format for further use
 3r3187.
3r3174.  3r3187. and much more. 3r3174.  3r3187. 3r3174.  3r3187. A lot of nerves, strength, patience, sleepless nights - spent. We make drawings at work - priceless. 3r3174.  3r3187. 3r3174.  3r3187. The script is written by me alone for the fourth year, and without the use of the gita, dark themes and other things). Only pascal, only hardcore. Thank you for listening to the end, I will be glad to communicate! 3r3183. 3r3187. 3r3187. 3r3187. 3r33180. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r3181. 3r3187. 3r3183. 3r3187. 3r3187. 3r3187. 3r3187.
+ 0 -

Add comment