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: 

Can users create an "alias" of a command to run a ULP?

7 REPLIES 7
Reply
Message 1 of 8
samykamkar
709 Views, 7 Replies

Can users create an "alias" of a command to run a ULP?

I'm using more ULPs and sometimes using hotkeys, but other times I'm using ULPs that have optional arguments I'd like to enter. "run ulpname arguments" works fine, but it would be nice to create an alias of "run ulpname" to a different command, eg just "ulpname". I can of course adjust the ULP file name to shorten it, but removing the "Run " would be nice as well in some common cases.

 

Is there a way to do this?

 

Thanks!

7 REPLIES 7
Message 2 of 8
edwin.robledo
in reply to: samykamkar

Hi SamyKamkar,

Your ideas and suggestion are greatly appreciated, by this time you have discovered that you can assign keyboard shortcuts or just command line the ULP using the RUN in front. But there doesn't exist an alias option for ULP, remember that by right clicking the ULP icon, you will have a history of the most recently used ULP's.  I will talk to the team and have them consider your idea as a future option!!

Best Regards,

Ed

 



Edwin Robledo
Tech Marketing Manager
Message 3 of 8
samykamkar
in reply to: edwin.robledo

Hi Ed,

 

Great, thanks! Right clicking is another great feature, thanks for pointing that out, however I'm more in the keyboard camp and trying to use keyboard as much as possible within Eagle.

 

If you do consider this suggestion of aliases, I would add the ability to use arguments similar to bash. For example, $0 is alias name, $1 is first argument, $2 is second argument, etc. $* is all arguments, and $# is number of arguments passed.

 

This way I might have aliases set up like:

"fp" -> "run find.ulp pad $*" (find pads)

"f" -> "run find.ulp $2 value $1" (if i wanted to switch around arguments)

 

Thanks!

Message 4 of 8
C.Nicks
in reply to: samykamkar

Hey Samy,

Your question inspired me to make a preset launching ulp. You can program in any command as a preset number in the board, schematic, and library independently. The presets will even run in any order you call them sequentially. You could even use multiple copies to have presets call presets.

This ulp could probably be extended to use delimited arguments fairly easily.

 

Let me know what you think.

 

For some reason the forum will not accept .ulp extension, so it has been renamed to .txt.

 

 

Best Regards,
Cameron


Eagle Library Resources


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 5 of 8
edwin.robledo
in reply to: C.Nicks

Hi Cameron.

GREAT STUFF!! Thanks for sharing!!

Edwin



Edwin Robledo
Tech Marketing Manager
Message 6 of 8
rachaelATWH4
in reply to: samykamkar

Hi Samy,

You could write a one line ulp for each alias. So you would have:

fp.ulp contains

exit(run find.ulp path argv[1];);

and f.ulp contains

exit(run find argv[2] value argv[1];);

I've not tested this as I am away from my laptop and just on my phone but I think it should work.

Best Regards,

Rachael
Message 7 of 8
samykamkar
in reply to: rachaelATWH4

Hi Rachael, thanks for the suggestion!

 

I primarily don't like typing "run " ('ru' is shorter and will work, but it's still repetitive). I'm fine with creating custom ULPs to handle arguments but if the team is going to add aliases, it would also be nice to have the args available within Eagle itself to more effectively manage.

Message 8 of 8
rachaelATWH4
in reply to: samykamkar

Hi Samy,

Yes I agree, it would be nice to be able to run the ulp as if it were a command without needing the run command and creating aliases seems a reasonable way to achieve this. An alternative which would work with my suggestion above would be to make it so if what you type doesn't match a command it searches the ulp path for a ulp to run, if nothing there then the script path.

Best Regards,

Rachael

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

Post to forums  

Autodesk Design & Make Report