Custom commands with a CUIX file not working correctly

Custom commands with a CUIX file not working correctly

AndrewXXFMV
Participant Participant
705 Views
3 Replies
Message 1 of 4

Custom commands with a CUIX file not working correctly

AndrewXXFMV
Participant
Participant

Hi everyone,

 

I have an issue where I have set up a custom CUIX file (partial CUI) with some custom commands. The commands are lisp routines I've found to be useful over the years,  and I have them mapped to buttons on the toolbar.

 

I am using AutoCAD 2021 and when I click my buttons on my CUI toolbar, they will call the last successful command and RARELY(sometimes) do the command I want them to actually do, after clicking multiple times.

 

I have no idea why its doing this, is it something to do with my Macro in the CUI? I am trying to deploy this to our employees but this thing isn't stable enough to use yet.

 

The lisp routines these buttons depend on are also attached to the CUI, is that the correct way to do this? I.E. once its ready, I have my employees load up the CUIX file and they should have everything they need to use the buttons.

 

AndrewXXFMV_0-1636733221929.png

 

0 Likes
Accepted solutions (1)
706 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant

You've really written a SPACE before a command name in a macro?

Z9E3zK5E_0-1636735484932.png

 

0 Likes
Message 3 of 4

jwhite
Advocate
Advocate

AutoCAD will take the space as an enter, which will repeat the previous command. That may produce the result you're seeing. You should have a space after the command name so it takes it as enter.

0 Likes
Message 4 of 4

Sea-Haven
Mentor
Mentor
Accepted solution

Space after ? Depending on your lisp is wether you need a space after or not. 

 

eg ^c^c(load "save2old") save2old

^c^c(if (not save2old)(load "save2old")) save2old .... does not load lisp again if already loaded.

^c^c(load "save2old")........... has (c:save2load) as last line in lisp

 

Just me I make all my custom mnu for pop and toolbars externally and not inside the cui, once you have a couple of lines can add more easier than using CUI via notepad. I do though at times steal/copy commands and icons from the CUI. 

 

0 Likes