element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) Eagle can't find scripts in project folder?
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 1 reply
  • Subscribers 176 subscribers
  • Views 653 views
  • Users 0 members are here
  • cadsoft eagle
  • scripts
Related

Eagle can't find scripts in project folder?

Former Member
Former Member over 9 years ago

Hi! First of all, I have been a long time lurker here and the posts on this support forum have been a great help to me. Thanks for this great support. If anyone can help me find the problem, I think this is the place I can find this person.

 

Here is my problem. I was writing a ULP to help me manage my BOMs. The last thing the ULP does is exit with a command to execute an Eagle script. Eagle started telling me that it cannot find the script. So, obviously, this is dum me who made a mistake so I started searching what I did wrong.

 

I simplified the problem to simply writing a script by hand that I save in my project folder. Here is the very complicated test script named banana.scr:

 

INFO R1;

 

Now, when I start eagle, I make sure the correct project is selected (green dot next to the project folder) and I also make sure I can see the script in the Eagle control panel under the said project. I open the schematic of the active project. In the command line, I type script banana. I get the following error:

image

 

Maybe I am assuming wrong, but I thought that Eagle would look for the script in all the directories you input in the Directories option and also in your active project folder.

 

Now, for some more information, when I use the Eagle GUI to run the script (i.e. File->Execute Script...) and browse to the script, it then runs fine. I can close the schematic and open it, the script will still run from command line. However, if I close Eagle and start it again, trying to run the script from command line yields the same error, "Can't find 'banana.scr'".

 

I am sure it is something I am doing wrong or not understanding properly, but I'm at a dead end here. I'm hoping someone could point me my mistake.

 

Thanks in advance for the help!

 

Olivier

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 9 years ago

    OK, I found my mistake. The mistake was assuming that Eagle will look into the project folder for the script. There actually are builtin functions for building file paths to your project. When you specify the full path, it works!

     

    For anyone wondering, if you want to build the full path for a script inside a ULP, here is an example:

    string temp_script_file_name;
    if (schematic) {
    schematic(SCH) {
      // Build temporary script name
      temp_script_file_name = filesetext(SCH.name, "_test.scr");
    }
    }
    output(temp_script_file_name) {
    printf("INFO R1;\n");
    }
    exit("SCRIPT '" + temp_script_file_name + "';");

     

    Hope this helps someone!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube