Jump to content

Is there a SYSTEM VARIABLE which controls the way LISP routines execute commands?


Recommended Posts

Posted

Hi guys,

 

Hopefully this will be a simple one for someone...

 

Up until about 5 minutes ago, the following code would initiate the commandline version of the LAYER command (either when executed through a LISP routine or by input into command line)...

 

(command "LAYER")

... Now the above code will launch the dialogue box version of the LAYER command as if I had simply input LAYER.

 

So, what I am wondering is... is there a system variable (or some other setting) which controls how commands within LISP routines are executes?

 

I know a simple work around for this is to enter a hyphen infront of any commands within my LISP routines, but I am curious as to what may have caused the change to my setup just in the last 10 or so minutes.

 

Thanks for any help.

Posted

Have you run any new lisps within that timeframe, which may have altered and failed to restore your prior settings if you hit ESC, for instance?

If you reboot, does the problem persist?

Posted

Hi Dadgad,

 

I cant really think of any LISP which may have altered any settings. The switch from normal to abnormal behaviour seemed quite sudden and I havent been able to think of anything which may have triggered the change.

 

The problem is still present after a reboot.

 

Thanks for taking the time to reply.

Posted

I think Dadgad is on spot, as usually, with the observation that the issue was induced by the run of an AutoLISP code. By any chance did you called the INITCOMMANDVERSION function with 2 as argument?

 

Please run the line below, it should fix your issue.

(initcommandversion 1)

Posted
Hi Dadgad,

 

I cant really think of any LISP which may have altered any settings. The switch from normal to abnormal behaviour seemed quite sudden and I havent been able to think of anything which may have triggered the change.

 

The problem is still present after a reboot.

 

Thanks for taking the time to reply.

 

This is one of those inevitable cases, where having an .svf (system variable file) might be a good thing.

Got one handy? If so, you can use it to restore your personal system variable setup.

Which in turn, might fix the problem which you are having.

Do you have SYSVDLG in 2010? I don't think you do, but that would be where I would go looking for

variable causes for this behavioral change. That is also a good place to go to save your .SVF file, at

the bottom of the dialog box. You can also restore the default variable settings there with the READ button.

I would freak if mine were restored to OOTB, as I have lots of customizations in my setup, and an .svf file as a fallback position.

I hope this helps you. :beer:

Posted
I think Dadgad is on spot, as usually, with the observation that the issue was induced by the run of an AutoLISP code. By any chance did you called the INITCOMMANDVERSION function with 2 as argument?

 

Please run the line below, it should fix your issue.

(initcommandversion 1)

 

Your lucky day, Mircea to the rescue. :)

I have no doubt he will be able to, if this hasn't already, sort you out! :beer:

Posted
I think Dadgad is on spot, as usually, with the observation that the issue was induced by the run of an AutoLISP code. By any chance did you called the INITCOMMANDVERSION function with 2 as argument?

 

Please run the line below, it should fix your issue.

(initcommandversion 1)

Yes, it would be better if we could see what's really going on. I thought this solution only worked for one call? That is, in the LISP routine. Wouldn't using "-Layer" call the commandline version every time? There are other possibilities as well, such as a redefined command somewhere, though it would have to be during loading AutoCAD if he rebooted. Using "_.Layer" should work in such a case.
Posted

Hi guys,

 

Thanks so much for all your help.

 

I have tried to restore to a .SVF backup which I had from about a week ago, and the problem still persists... which suggests to me that the issue is not with any SYSVARs.

 

I am also under the impression that (initcommandversion 1) only affects the next command issued. So it seems that had I inadvertently set (initcommandversion 2)... it would also only affect the very next command issued. If INITCOMMANDVERSION were a 'system varialble' this could well be the solution.

 

I have already begun altering a few of my routines to add the hyphen before any command calls, and this of course works.

 

But I would still like to know what caused the issue in the first place.

 

Thanks again.

Posted

A parting shot from an illisperate, who occasionally gets lucky with variables.

Glad to hear that you had an .svf to restore your settings, and that may have precluded this shot in the dark. There just don't seem to be very many published

system variables dealing with such issues. :)

CMDECHO MAYBE..jpg

Posted

Thanks again Dadgad,

 

I've had a bit of a look the SYSVDLG with no luck. I do plan to check it out more thoroughly though.

 

Thanks again.

Posted (edited)

Try this:

(command "-LAYER")

or this:

(command "_.-LAYER")

EDIT: Nevermind.

Had I bothered to read all the words in the original post, I would have known the originator was already aware of those.

 

But here's a guy having just the opposite issue. Perhaps setting the variables listed to "0" will help you as well.

 

Steve

Edited by StevJ
  • 3 years later...
Posted

I know this is a fairly old thread but for the sake of anyone else who has to spend time figuring out why an old lisp won't work...

 

ATTDIA and other DIALOG box variables will wreck some old lisp routines. Particularly if you're getting an "unknown command" error frequently popping up during it. It's worth look at.

 

When I turned that sucker off - it went back to working again... wasted 2 hours because SOMEHOW that variable got flipped.

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...