+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Full Member level 5
    Points: 3,913, Level: 14

    Join Date
    May 2006
    Posts
    268
    Helped
    2 / 2
    Points
    3,913
    Level
    14

    ULP file that renames all VIAS with name "GND1", "GND2", etc. to "GND"

    Hello,

    i placed about 500 vias and need to "name" them to GND.
    Is it really necessary to click at each of it ?

    Thx

    elektr0

    •   AltAdvertisement

        
       

  2. #2
    Full Member level 5
    Points: 3,913, Level: 14

    Join Date
    May 2006
    Posts
    268
    Helped
    2 / 2
    Points
    3,913
    Level
    14

    Re: EAGLE_NAME

    The following ULP file renames all VIAS with name "GND1", "GND2", etc. to "GND"

    Just type run rename-via.ulp GND


    --------



    #usage "replace vias with signal name

    "

    string newname = strupr(argv[1]);

    string cmd = "GRID MM finest;\nDISPLAY NONE 18;\n";
    string s;

    if (board) board(B) {
    B.signals(S) {
    if (S.name != newname) {
    if (strstr(S.name, newname) == 0) {
    S.vias(V) {
    sprintf(s, "RIPUP (%.4f %.4f);\n CHANGE DRILL %.4f;\n CHANGE DIAM %.4f;\nVIA '%s' (%.4f %.4f);\n",
    u2mm(V.x), u2mm(V.y),
    u2mm(V.drill),
    u2mm(V.diameter[1]),
    newname,
    u2mm(V.x), u2mm(V.y)
    );
    cmd+=s;
    }
    }
    }
    }
    exit(cmd);
    }



--[[ ]]--