Author Topic: LIST command odd behavior  (Read 5679 times)

0 Members and 1 Guest are viewing this topic.

gisdude

  • Newt
  • Posts: 23
LIST command odd behavior
« 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,

ronjonp

  • Needs a day job
  • Posts: 7527
Re: LIST command odd behavior
« Reply #1 on: November 16, 2018, 11:47:07 AM »
Did you try .list?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

gisdude

  • Newt
  • Posts: 23
Re: LIST command odd behavior
« Reply #2 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"?

Dlanor

  • Bull Frog
  • Posts: 263
Re: LIST command odd behavior
« Reply #3 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?

ronjonp

  • Needs a day job
  • Posts: 7527
Re: LIST command odd behavior
« Reply #4 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.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

gisdude

  • Newt
  • Posts: 23
Re: LIST command odd behavior
« Reply #5 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...

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: LIST command odd behavior
« Reply #6 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.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

gisdude

  • Newt
  • Posts: 23
Re: LIST command odd behavior
« Reply #7 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...

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: LIST command odd behavior
« Reply #8 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.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

gisdude

  • Newt
  • Posts: 23
Re: LIST command odd behavior
« Reply #9 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

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: LIST command odd behavior
« Reply #10 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 )
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

gisdude

  • Newt
  • Posts: 23
Re: LIST command odd behavior
« Reply #11 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?


ChrisCarlson

  • Guest
Re: LIST command odd behavior
« Reply #12 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.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: LIST command odd behavior
« Reply #13 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. )
« Last Edit: November 19, 2018, 05:12:09 PM by kdub »
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: LIST command odd behavior
« Reply #14 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
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}