Jump to content

Recommended Posts

Posted

The code below has confounded me for a while and now I am finally asking for a bit of help with it. When I use "xs" at the command line to invoke this code it gives me an Unknown Command feedback. I don't quite understand why.

 

Any of you LISP guru's willing to enlighten me as to why this is the case?

 

Thanks

 

(defun c:xs    () (command "xlist"))

Posted

Why don't you just create a command alias instead?

Posted

I'm no code guru, but I can ask an obvious question...did you load the lisp before you tried to run it?

Posted

Neither am I but aeven that amount of code is overkill for running the XLIST command. A command alias is the way to go in my opinion.

Posted

Depends on what he's trying to do. If this is an exercise to learn lisp programming, starting with something that has predictable results is not a bad way to go. Could be the start to a more complicated program...all sorts of stuff.

Posted

I'm a huge fan of two letter keyins and I have a lisp routine full of the ones I commonly use that I have load from the Startup Suite. (The commands in this lisp routine override the command alias but I'm not sure if that is always a true statement.) This command is just one of those. I tend to leave the command alias alone and just let this one do the work for me. This way each time I go to a different PC I can simply load the lisp file. This is also helpful because it is easily portable when I go to another office. I keep the file on a thumb drive. It is what I have used for years to simplify things.

 

I'm no code guru' date=' but I can ask an obvious question...did you load the lisp before you tried to run it? [/quote']LOL I had to chuckle at this because of how easily it can be overlooked but to answer your question. Yes I did. It loads each time I start-up AutoCad.

 

Also I'm trying my best to learn VB LISP but with limited time and being one who struggles with such things I would also like to know why the problem exist to better understand what I'm trying to learn.

Posted

Since XList is an Express Tool and defined in the xlist.lsp file, you will need to call it using its function definition:

 

(defun c:xs nil (c:xlist))

 

PS: It would have been clearer if you had described the full error message, i.e. "Unkown Command: XLIST"

Posted

The acad.pgp file is not so big that it too (after customization) could be carried on a flash drive. But I see your point re: moving from computer to computer with your custom lisp routines at your quick disposal.

Posted
Since XList is an Express Tool and defined in the xlist.lsp file, you will need to call it using its function definition:

 

(defun c:xs nil (c:xlist))

 

PS: It would have been clearer if you had described the full error message, i.e. "Unkown Command: XLIST"

 

Thanks Lee. I will make sure to include the full extents of the message next time.

Posted
The acad.pgp file is not so big that it too (after customization) could be carried on a flash drive. But I see your point re: moving from computer to computer with your custom lisp routines at your quick disposal.

 

I agree with you on this one ReMark. But since we have common drives throughout the company and we use a WAN I can access my lisp file from there. Every employee in the company has a their own folder on their offices local server which can be access via the WAN. But I do keep it on the flash drive for the 'just in case' scenario. Fortunately I do not have to move too often (at least now) to another PC but instead I use RDP (remote connection) to access them.

Posted

You could path your user folder in Support Paths (in Options), have it set as the top directory and place a custom acad.pgp in your user folder. It will be loaded before the one located with the autocad executable, etc. files, installed on the C drive.

Posted
You could path your user folder in Support Paths (in Options), have it set as the top directory and place a custom acad.pgp in your user folder. It will be loaded before the one located with the autocad executable, etc. files, installed on the C drive.

 

Interesting. 8) So many ways to do what one needs to do sometimes. Always good to learn other ways to do things. Although I don't think this would work with multiple PC's that I visit that I don't normally login to. Some of our engineers are the most inept when it comes to using AutoCad so I do my best to educate them. Having a lisp routine readily available on the server makes it easy for me to load when I "help" a fellow employee.

Posted
Interesting. 8) So many ways to do what one needs to do sometimes. Always good to learn other ways to do things. Although I don't think this would work with multiple PC's that I visit that I don't normally login to. Some of our engineers are the most inept when it comes to using AutoCad so I do my best to educate them. Having a lisp routine readily available on the server makes it easy for me to load when I "help" a fellow employee.

 

Loading a lisp to change all the settings from a thumb drive is a great way to make temporary changes to a workstation. If you added one that put everything back the way it was when you got done, the every day user of that station might have more piece of mind....just a thought.

Posted
Loading a lisp to change all the settings from a thumb drive is a great way to make temporary changes to a workstation. If you added one that put everything back the way it was when you got done' date=' the every day user of that station might have more piece of mind....just a thought.[/quote']

 

I just mentioned that I keep in a thumb drive to make it more portable. I certainly understand your concern which is why I implement it the way that I do. The lisp routine I use only affects my login because it is only in my Startup Suite found in the APPLOAD dialog. If I go to another PC that is not using my login then as soon as AutoCad is restarted my routine will not be in affect since I don't make it a part of their Startup Suite. I just load it when I'm helping.

 

As far as my work station goes; no one else uses it except me anyway but even if someone else were to login to mine my lisp routine wouldn't even load unless they did it themselves.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...