LISP Weird interaction with (Command ... ) on some workstations

LISP Weird interaction with (Command ... ) on some workstations

JGranata_GdB
Enthusiast Enthusiast
848 Views
15 Replies
Message 1 of 16

LISP Weird interaction with (Command ... ) on some workstations

JGranata_GdB
Enthusiast
Enthusiast

I have been running LISP routines with (command "_.COMMAND" etc.) perfectly fine until recently. 
On some workstation (AutoCAD2025) the routines had started throwing error messages such as below: 

Command: (command "_.Layer" "make" "TESTLAYER" "")
_.Layer
Command: make Unknown command "MAKE". Press F1 for help.

Command: TESTLAYER Unknown command "TESTLAYER". Press F1 for help.

or 

Command: (command "_.menuload" "C:/LocalCUI/TEST.cuix")

_.menuload
Command:C:/LocalCUI/TEST.cuix Unknown command "CUIX"

 

The initial patchwork solution was to change the ._ to a - , however I am not sure what other downstream issues that changing these will make for all our other routines or possible issues. 

 

I have attempted to search the forums, but found nothing related (might just be searching for the wrong terms).

I though it was a cmdecho issue, but that doesn't seem to solve anything.

I tried resetting the User Profile For AutoCAD2025 (as those same workstations also have C3D and the original codes work file), that also does not resolve the issue. 

I have talked with Lee-Mac, and the suggestion to use the combo ._- instead such as 

(command "_.-Layer" "make" "TESTLAYER" "")

While this fixes the issue with Layer command, it does nothing with Menuload command and I have not done enough testing on the various other commands to see if the Menuload is a one off issue and I should be loading in the CUIX using a different method. 

 

Has anyone encounter a similar issue and know how I could resolve the issue without modifying all my routines?

 

Is there some variable (environmental or system) that controls if command-line version is used? 

0 Likes
849 Views
15 Replies
Replies (15)
Message 2 of 16

ВeekeeCZ
Consultant
Consultant

If you use non-english version you should add underscore to all the options...

(command "_.layer" "_make" "Testlayer" "")

 

Edit: Tested in C3D 2025 without issues.

0 Likes
Message 3 of 16

JGranata_GdB
Enthusiast
Enthusiast

Using English version on all workstations. 

 

To re-focus, incase I was not clear, what would cause a workstation that previously accepted underscore and dot options to not work and throw errors? 

(command "_.layer" "_make" "Testlayer" "") 

returns

Command: make Unknown command "MAKE". Press F1 for help.
Command: TESTLAYER Unknown command "TESTLAYER". Press F1 for help.

 

To get the code to work on this workstation, the LISP needs to be changed to: 

(command "_.-Layer" "make" "TESTLAYER" "") or  (command "-Layer" "make" "TESTLAYER" "")

 

All other workstations still work and accept the original code, with Underscore and Dot, no Dash. 

(command "_.layer" "_make" "Testlayer" "")

 

0 Likes
Message 4 of 16

ВeekeeCZ
Consultant
Consultant

Unless you're using a major addon that changes commands (eg. Carlson), then it must be a bug in 2025. Have you done any updates recently?

I certainly wouldn't recommend any mindless changes to prefixes. It might fix some issues, but more likely not all.
I don't know of any new sysvars that could be causing this.
If it's a 2025 issue, it should be thoroughly tested and reported.
I don't use 2025 on a regular basis, so I can't give advise based on my experience with 2025. 

Message 5 of 16

cadffm
Consultant
Consultant

Hi,

 

it seems your ACAD has huge problems, i would run a clean uninstall and clean new install.

Your ACAD doesn't detect your command-run as "Script mode".

Try this: FILEDIA =0

Menuload works, right?

 

I would not try to find the issue, because I think there is not just one. ReInstall!

 

 

_ _ _

 

 

Offtopic Note:

Command: (command "_.Layer" "make" "TESTLAYER" "")

doesn't make sense

 

make sense, works in all language versions

(command "_.Layer" "_make" "TESTLAYER" "")

make sense, works in englisch versions only

(command ".Layer" "make" "TESTLAYER" "")

 

 

Sebastian

Message 6 of 16

JGranata_GdB
Enthusiast
Enthusiast

Carlson is installed on this workstation, hence the hesitation to just revert back to a DASH command without the Underscore/Dot combo. 

I can test some more on 2025 to see what I can find and submit a report to AutoDesk. 

 

Following CADFFM's advice, I will uninstall and reinstall on the workstation. Was hoping it was something I overlooked - but an isolated issue like this would be easy to fix. After i do that, ill report back. 

 

To answer the questions: 

FileDia was set to 1. Even when set to 0, the issues occur on both Layer and MenuLoad. 

Correct - Menuload works when run and going through the popup window to find the appropriate CUIX. After loading or unloading the CUIX, those also work as expected.  

0 Likes
Message 7 of 16

cadffm
Consultant
Consultant

Hi,

 

>"Carlson is installed on this workstation"

In this case, you have to test AutoCAD WITHOUT Carlson first!

 

My answe was for Standard AutoCAD installation, without such plugIns

 

 

>"Following CADFFM's advice, I will uninstall and reinstall on the workstation."

It' a good idea, but if the issue comes with carlson, it isn't a solution.

 

>"FileDia - Even when set to 0, the issues occur on both Layer and MenuLoad"

Filedia=0 has nothing to do with a solution,

but since you have a workaround for LAYER, I mentioned this for menuload - to verify my idea about the internal issue.

 

With filedia=0, menuload should work find in your (command statement - with NO PopUp dialog.

You say the menuload dialog appears, also with filedia=0, that's strange like the original issue of this thread.

100% Buggy, nothing how it should works.

 

 

Waiting of your new install - test

 

 

>" and submit a report to AutoDesk. "

If it is not a carlson issue, right. What I can say: It is not a general AutoCAD 2025 issue,

it sounds like an installation error.

 

If you install and start AutoCAD, without running anti-virus software and with admin rights,

do not use the offered MIGRATION option (if you have older AutoCAD versions installed too)

Sebastian

0 Likes
Message 8 of 16

JGranata_GdB
Enthusiast
Enthusiast

Yes - all testing was done with just plain AutoCAD WITHOUT Carlson. I even went as far as uninstalling Carlson so there was no accidental interaction. Granted, Carlson MAY have changed or corrupted something before the uninstall. 

0 Likes
Message 9 of 16

paullimapa
Mentor
Mentor

Do you have the latest 2025.1.2 update installed?

Enter ABOUT command, do a screenshot and share that here.

Have you tried downloading and installing 2026 to see if this behavior is resolved on the latest release?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 10 of 16

JGranata_GdB
Enthusiast
Enthusiast

Performed a basic uninstall (Add/Remove Program through the Windows control panel) and re-install to 2025.1.2 did not resolve the issue. 

 

The computer also has a current install of Civil3D 2025 and Map 3D 2025 on the computer. When running the same routines, these instances do not demonstrate the issue.

The new install of AutoCAD 2026 does not demonstrate the issue. 

 

Edit: This issue only seems to happen in the AutoCAD 2025 install, even after the reinstall. 

JGranata_GdB_0-1743096162869.png

 

0 Likes
Message 11 of 16

paullimapa
Mentor
Mentor

There must be something triggering this since this is happening only on 2025.1.2 and on all your workstations but no one else outside of your office is encountering such problems.  Have you tried setting up a new workstation with just Windows OS and doing a clean 2025.1.2 install on that to test to see if the same problem occurs on that?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 12 of 16

JGranata_GdB
Enthusiast
Enthusiast

This is happening only on ONE workstation. 

 

The user is happily working on Civil3D with no issues and all basic AutoCAD function is working. 

Edit: There is not a LARGE need to resolve this, more so want to know how to incase it comes up again. I can do a Clean wipe of all AutoDesk products, deleting folders in addition to the uninstalls, however I was hoping to not go that route. 

0 Likes
Message 13 of 16

Sea-Haven
Mentor
Mentor

Re menuload if menu exists must unload then reload. You need to set the values with the XXX.

(setq Menu_Path "C:\\XXX-CAD-TOOLS\\") ; Path to Menu file
(setq Menu_Name "XXX-CAD-TOOLS") ; pop menu to load
(setq Group_Name "XXXMENU") ; groupname assigned in .mnu or .mns file

(if (menugroup menu_Name)
(command "_MENUUNLOAD" menu_Name)
)
(setq cnt (vla-get-count(vla-get-menuGroups (vlax-get-acad-object))))
(if  (> (vl-string-search  "BRICSCAD" (strcase(getvar 'product))) 0)
(progn
(command "MENULOAD" (strcat Menu_Path Menu_Name ".mnu"))
(menucmd (strcat "P" (rtos (+ cnt 1) 2 0) "=+" menu_Name ".POP1"))
)
(progn
(command "MENULOAD" (strcat Menu_Path Menu_Name ".mnu"))
(menucmd (strcat "P" (rtos (+ cnt 1) 2 0) "=+" menu_Name ".POP1"))
)
)
(setvar "menubar" 1)

(alert "\n Menu loaded \n \n XXX CAD Tools now installed")

  

0 Likes
Message 14 of 16

JGranata_GdB
Enthusiast
Enthusiast

The "weird" issue I have is that when running the LISP (or just copying code to the command line) using the (COMMAND ... ) code it does not work as expected. 

In your example here: 

(command "MENULOAD" (strcat Menu_Path Menu_Name ".mnu"))

 On the workstation AutoCAD will stop the code and open the popup box, no matter if I have FILEDIA set to 0 or 1 and will stop the code in its tracks. 

 

It seems like this situation is a one-off corruption/bug on that computer and not anything related to the existing LISP, ACAD Version or a new SYSTEM or ENVIORNMENTAL variable that I was unaware of. 

 

My Current options/paths:

1) I am talking with the user to see if a deep uninstall (Uninstalling all products and then manually deleting all ACAD related projects, folders, register) is needed since an Uninstall/Reinstall of only ACAD2025 is not working,.
2) Checking with the user to see if moving to ACAD2024 or ACAD2026 is an option, or can they survive using MAP3D and Civil3D only. 
3) Less ideal for me, is to revisit all codes with COMMAND and test if "_.-"  option works on all codes, including adding  "_" on the option steps [as CADFFM suggested with (command "_.Layer" "_make" "TESTLAYER" "") ]. In the process of testing these, I would find the codes that wont work for this user. The least likely option I would do right now. 

0 Likes
Message 15 of 16

Sea-Haven
Mentor
Mentor

For the menuload I am loading the source menu file a mnu, if you used CUI to make a menu then use CUI "Bricscad", CUIX "Acad"

0 Likes
Message 16 of 16

cadffm
Consultant
Consultant

It sounds you still not on point.

 

My try:

He has a general issue, not just a menuload problem.

Layer command for example. While in automation  > menu macro, script, or (send)commands

AutoCAD would start command "-LAYER" instead of sended "LAYER",

but there is on PC that don't follow this rule and open the palette (or dialog),

instead of offering the -layer options in command line.

 

 

@JGranata_GdB 

Installed and started without antivirus software, with addmin rights, okay - I have no idea then.

You tried different windows users, not just the profile every test?

 

Sebastian

0 Likes