AutoLISP help

AutoLISP help

Anonymous
Not applicable
1,042 Views
5 Replies
Message 1 of 6

AutoLISP help

Anonymous
Not applicable

Hello All.

 

I come to you, cap in hand begging basically. I'm an IT support guy and one of our customers uses AutoCAD.

 

The one user I am dealing with had some custom commands wherein they would type CX, CY, CZ and this would perform UCS X 90 command and then the relevant command for the other axis. Somehow these commands were deleted, and it seems the only way to put them back is to program them back in using AutoLISP.

 

So my plea is, could anyone tell me how I can just program this command back in, i've followed the introduction to AutoLISP tutorials but these are from a very broad approach and I don't want to have to learn an entire new programming language just to close one ticket.

 

Any assistance would be greatly appreciated.


Thanks 

0 Likes
Accepted solutions (1)
1,043 Views
5 Replies
Replies (5)
Message 2 of 6

imadHabash
Mentor
Mentor

Hi and welcome to AutoDesk Forum,

 

i suggest to post your issue in this forum >> Click << .

 

>> Somehow these commands were deleted, <<

for me this is weird and it's big issue that i have to know how it's occurred !!!!

 

Good Luck..

 

 

Imad Habash

EESignature

0 Likes
Message 3 of 6

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

you can add the first 3 lines of the attached file into your ACAD.LSP or load that file into AutoCAD.

 

(defun C:CX()(command "_UCS" "_X" "90"))
(defun C:CY()(command "_UCS" "_Y" "90"))
(defun C:CZ()(command "_UCS" "_Z" "90"))
(print "Commands CX, CY, CZ loaded")
(prin1)

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 4 of 6

Anonymous
Not applicable

Alfred you are a star! Thank you very much 

0 Likes
Message 5 of 6

scot-65
Advisor
Advisor
Alfred's method can be expanded for those
other command aliases that require one of the
options to be selected. Something the PGP
cannot do.

The list can be as long as one's imagination.

I personally like S and ST.
STRETCH "CR" ~ crossing (stretch window is the same as MOVE)
STRETCH "CP" ~ crossing polygon (fence)

Just make sure there are no conflicts to the
PGP or any other "utility" file.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 6 of 6

BeKirra
Advisor
Advisor

This may be off the topic.

 

I haven't seen an IT guy like you before.

Appreciated what you are willing to do.

You are a nice guy.

 

Cheers.

Please mark "Accept as Solution" and "Like" if my reply resolves the issue and it will help when others need helps.
= ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ = ♪ = ♫ =
A circle is the locus of a cursor, starting and ending at the same point on a plane in model space or in layout such that its distance from a given coordinates (X,Y) is always constant.
X² + Y² = C²
0 Likes