Community
EAGLE Forum
Welcome to Autodesk’s EAGLE Forums. Share your knowledge, ask questions, and explore popular EAGLE topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use a C-program in a ULP file

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
jeyeffkay
460 Views, 3 Replies

Use a C-program in a ULP file

Hey guys!

 

While working on a plugin which will be used in Eagle 9.6 I ran into a problem:

It creates a cvs file, which works perfectly fine, and now I want to convert this into a xlsx file.

I found a C-tool (xlsxwriter) which should be able to do this but, as far as I´m concerned, it won´t work in my ulp program.

My idea is, that I can write a C program, which get opened by the .ulp, does it´s it magic, safes the .xlsx file, closes itself and it goes back to the original program.

 

Does anyone has an idea what I could try or what would be a better idea (e.g. it would be great, if the .ulp could create an .xlsx)?

Labels (1)
  • ULP
3 REPLIES 3
Message 2 of 4
jorge_garcia
in reply to: jeyeffkay

Hi @jeyeffkay,

 

I hope you're doing well. You can use the system() function in the ULP language. This will allow you to call the xlsxwriter program and pass it the file you want it to process, once it finishes it will come back to the ULP.

 

You already have a csv file, it's pretty trivial to open it in Excel and then save it as an xlsx file. That might be an easier way to do it.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Message 3 of 4
jeyeffkay
in reply to: jorge_garcia

Hi @jorge_garcia ,

 

trank you very much for your answer!

 

That sounds very good, thank you! Is there a way to pass the file directly or should I just save it and reopen it?

 

That is true, yes, but Id like to automate it as far as possible, so it wolle bei nice to have an excel sheet as an Output.

 

Greetings,

Jeyeffay 

Message 4 of 4
jorge_garcia
in reply to: jeyeffkay

Hi @jeyeffkay ,

 

If you look at the documentation, you can pass the string to the program or you can have it open the csv file that you generated. It really all depends on what arguments xlsxwriter expects.

 

See the documentation for the system() command for more info.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report