<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Format Board to Match Schematic in EAGLE Forum</title>
    <link>https://forums.autodesk.com/t5/eagle-forum/format-board-to-match-schematic/m-p/9175957#M12071</link>
    <description>&lt;P&gt;autoplace_v3.ulp&lt;/P&gt;&lt;PRE&gt;/* Simple autoplace ulp based upon component position in schematic
* this ULp was origianlly written by one of the CADSOFT team I believe
* apologies for lack of full reference and acknoledgement
* run the ULP in the sch window and run place.scr in BRD
* changing the scale parameter will produce tighter/looser grouping
* Ideally stick in a pop-up window to select scale and x/y offset at some time
*/
string c,cmd;
real scale = 0.75;
int HasPins,
    IsSupplySymbol,
    Px, Py, xoffset, yoffset,
    ix,                    
    GridDist = 50,
    ShOffset = 3000,            
    y_ShOffset = 4000,
    x_ShOffset = 7500;

                   output("place.scr") {
			
                    if (schematic) schematic(SCH) {
			cmd+= "board; \n";
                       sprintf(c, "Grid mil 50;\n");
			cmd+= c;
                       SCH.sheets(S) {
                         S.parts(P) {
                           ix = 0;
                           P.instances(I) {
                             if (ix==0) {
                                Px = round(scale*(u2mil(I.x)) / GridDist) * GridDist;
                                Py = round(scale*(u2mil(I.y)) / GridDist) * GridDist;
                                } 
                             HasPins = 0;
                             IsSupplySymbol = 0;
                             I.gate.symbol.pins(PIN) { 
                               if ((PIN.direction == PIN_DIRECTION_SUP)) 
                                  IsSupplySymbol = 1;
                               HasPins = 1;
                               }
                             ix++;
                             }
                           if (HasPins &amp;amp;&amp;amp; !IsSupplySymbol) {
				xoffset = x_ShOffset*trunc(0.5*(S.number-1));
				yoffset = y_ShOffset*2*frac(0.5*(S.number-1));
                              sprintf(c, "Move %s (%d %d);\n", P.name, Px+xoffset, Py+yoffset);                           
				cmd+= c;
                              }
                           } // end parts
                         }   // end sheets 
    			printf("GRID LAST;\n");
    			printf("RATSNEST;\n");
    	              }

                    }
exit(cmd);&lt;/PRE&gt;</description>
    <pubDate>Sun, 01 Dec 2019 20:17:00 GMT</pubDate>
    <dc:creator>Yura.Ivanov.VLuki</dc:creator>
    <dc:date>2019-12-01T20:17:00Z</dc:date>
    <item>
      <title>Format Board to Match Schematic</title>
      <link>https://forums.autodesk.com/t5/eagle-forum/format-board-to-match-schematic/m-p/9175298#M12070</link>
      <description>&lt;P&gt;Is there a way to automatically format parts in the board to be in the same position as they are on the schematic? I have probably around a hundred components in a schematic, which are all a jumble on the board. Do I need to manually move each piece into position one by one, or can I automatically format it? I am running Eagle 9.5.1.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 03:26:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/eagle-forum/format-board-to-match-schematic/m-p/9175298#M12070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-01T03:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Format Board to Match Schematic</title>
      <link>https://forums.autodesk.com/t5/eagle-forum/format-board-to-match-schematic/m-p/9175957#M12071</link>
      <description>&lt;P&gt;autoplace_v3.ulp&lt;/P&gt;&lt;PRE&gt;/* Simple autoplace ulp based upon component position in schematic
* this ULp was origianlly written by one of the CADSOFT team I believe
* apologies for lack of full reference and acknoledgement
* run the ULP in the sch window and run place.scr in BRD
* changing the scale parameter will produce tighter/looser grouping
* Ideally stick in a pop-up window to select scale and x/y offset at some time
*/
string c,cmd;
real scale = 0.75;
int HasPins,
    IsSupplySymbol,
    Px, Py, xoffset, yoffset,
    ix,                    
    GridDist = 50,
    ShOffset = 3000,            
    y_ShOffset = 4000,
    x_ShOffset = 7500;

                   output("place.scr") {
			
                    if (schematic) schematic(SCH) {
			cmd+= "board; \n";
                       sprintf(c, "Grid mil 50;\n");
			cmd+= c;
                       SCH.sheets(S) {
                         S.parts(P) {
                           ix = 0;
                           P.instances(I) {
                             if (ix==0) {
                                Px = round(scale*(u2mil(I.x)) / GridDist) * GridDist;
                                Py = round(scale*(u2mil(I.y)) / GridDist) * GridDist;
                                } 
                             HasPins = 0;
                             IsSupplySymbol = 0;
                             I.gate.symbol.pins(PIN) { 
                               if ((PIN.direction == PIN_DIRECTION_SUP)) 
                                  IsSupplySymbol = 1;
                               HasPins = 1;
                               }
                             ix++;
                             }
                           if (HasPins &amp;amp;&amp;amp; !IsSupplySymbol) {
				xoffset = x_ShOffset*trunc(0.5*(S.number-1));
				yoffset = y_ShOffset*2*frac(0.5*(S.number-1));
                              sprintf(c, "Move %s (%d %d);\n", P.name, Px+xoffset, Py+yoffset);                           
				cmd+= c;
                              }
                           } // end parts
                         }   // end sheets 
    			printf("GRID LAST;\n");
    			printf("RATSNEST;\n");
    	              }

                    }
exit(cmd);&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Dec 2019 20:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/eagle-forum/format-board-to-match-schematic/m-p/9175957#M12071</guid>
      <dc:creator>Yura.Ivanov.VLuki</dc:creator>
      <dc:date>2019-12-01T20:17:00Z</dc:date>
    </item>
  </channel>
</rss>

