When you need to know the path of the project you are running the ULP within the following code snippet is useful.
string get_project_path() {
if (board) board(B) return(filedir(B.name));
if (schematic) schematic(B) return(filedir(S.name));
if (library) library(B) return(filedir(L.name));
}
string Directory;
Directory = get_project_path();
dlgMessageBox(Directory, "+Yes", "No","Maybe");
0 Comments