TheSwamp

CAD Forums => CAD General => Topic started by: gisdude on November 16, 2018, 11:40:45 AM

Title: LIST command odd behavior
Post by: gisdude on November 16, 2018, 11:40:45 AM
Hi all,
The last day I noticed my LIST command is not LISTING. I type LI and "DS> Highlight Selected Layers <Yes>/No:". I will pick a line or block and it TURNS OFF the layer. WTF? I don't get it.

I looked in the .pgp file and LI does point to LIST. Weird.

Many thank for any help,
Title: Re: LIST command odd behavior
Post by: ronjonp on November 16, 2018, 11:47:07 AM
Did you try .list?
Title: Re: LIST command odd behavior
Post by: gisdude on November 16, 2018, 11:53:31 AM
Well, that works!

So, this begs my question, how to I change that .LIST to just plain old "LI"?
Title: Re: LIST command odd behavior
Post by: Dlanor on November 16, 2018, 12:08:47 PM
Hi all,
The last day I noticed my LIST command is not LISTING. I type LI and "DS> Highlight Selected Layers <Yes>/No:". I will pick a line or block and it TURNS OFF the layer. WTF? I don't get it.

I looked in the .pgp file and LI does point to LIST. Weird.

Many thank for any help,

A more important question is, does something else point to LI later in the pgp file?
Title: Re: LIST command odd behavior
Post by: ronjonp on November 16, 2018, 12:47:25 PM
Well, that works!

So, this begs my question, how to I change that .LIST to just plain old "LI"?
Make sure your PGP has this in it:
LI,        *LIST

Also check that there isn't another LI definition later in the file as it will override the previous.
Title: Re: LIST command odd behavior
Post by: gisdude on November 16, 2018, 01:48:50 PM
I looked for LI in another instance, but no go.

I attached a copy if anyone is interested. Really kind of mystifying...
Title: Re: LIST command odd behavior
Post by: dgorsman on November 16, 2018, 02:47:50 PM
Try !LI and !LIST at the command line.  If either has been redefined it takes precedence over any PGP shortcut.
Title: Re: LIST command odd behavior
Post by: gisdude on November 16, 2018, 03:41:03 PM
So, this is REALLY weird.

I tried "!LIST" AND THIS IS WHAT I GET: "#<SUBR @0000021a92c84d48 LIST>

Seriously?!!

When I do "!LI", it just comes up "nil"

hmmm...
Title: Re: LIST command odd behavior
Post by: kdub_nz on November 16, 2018, 05:44:49 PM
What happens when you try the following commmands ??

LIST
LI
LS


If LIST and LS work
and LI does not, I'd suggest that the LI command has been defined elsewhere.


The prompt you get about
Quote
Highlight Selected Layers <Yes>/No:
Do you recall seeing this elsewhere ??

note
The ! prefix does not evaluate command aliases from the .PGP file.
That is why the !LI is returning nil.
Title: Re: LIST command odd behavior
Post by: gisdude on November 19, 2018, 10:10:57 AM
@kdub,
LIST - works fine.
LI - "DS>Highligh Selected Layers <Yes/No:" This does not happen for other commands.
LS - "Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue. eInvalidLayer."

The LS error has a long and detailed error description. Oy vey.

I am using "aliasedit" to edit the .pgp file. I deleted "LI" and "LS", but LIST command still works. Also, LIST is not shown in the aliasedit.

Thx for any help
Title: Re: LIST command odd behavior
Post by: kdub_nz on November 19, 2018, 02:39:51 PM
LIST is a built in AutoCAD command, not an alias command ... in fact, in your posted PGP file both LI and LS were defined to use the built in LIST command.

Now that you've deleted the alias definitions from the PGP what happens when you try the LI and LS at the command line ??
( this will test if the names are defined elsewhere )
Title: Re: LIST command odd behavior
Post by: gisdude on November 19, 2018, 04:04:17 PM
Yeah, you're right. I type LI or LS and the ""DS>Highligh Selected Layers <Yes/No:" prompt comes up.

So...I guess there is another location for the .pgp file that my autocad install is pointing to?

Title: Re: LIST command odd behavior
Post by: ChrisCarlson on November 19, 2018, 04:27:10 PM
Yeah, you're right. I type LI or LS and the ""DS>Highligh Selected Layers <Yes/No:" prompt comes up.

So...I guess there is another location for the .pgp file that my autocad install is pointing to?

Sounds like you have a lisp routine loaded, do a search of your loaded routines for their commands.
Title: Re: LIST command odd behavior
Post by: kdub_nz on November 19, 2018, 05:04:34 PM
What does this return

(findfile "ACAD.PGP")

That will be the one Autocad is loading.

//-----------------

As several of us have suggested : The most obvious cause is that LI and LS are functions defined elsewhere your code ... I'd say it's something you have recently started to use . ( either your own or something borrowed. )
Title: Re: LIST command odd behavior
Post by: dgorsman on November 20, 2018, 01:28:47 PM
^ THIS

This is why I tend to harp on about using verbose command names for customization work.

One of our legacy systems has a command as (defun C:A ( / ) ...).   :tickedoff:  Try telling the users they cannot use a simple "A" as a PGP alias.   :x
Title: Re: LIST command odd behavior
Post by: cadtag on December 05, 2018, 04:28:03 PM
Dollars to Donuts you have some Toolpac software from Dotsoft running. The clue is the "DS>" in the promopt.  Terry's pretty good about tagging his stuff that way.