Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

is this possible to setq..

9 REPLIES 9
Reply
Message 1 of 10
Anonymous
228 Views, 9 Replies

is this possible to setq..

can i setq the @ symbol?

is it possible?
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: Anonymous

andrew_nao a écrit :
> can i setq the @ symbol?
>
> is it possible?


try, you'll see 😉

i have done for you:

Command: !@
nil

Command: (setq @ 'at)
AT

Command: !@
AT


--
Bruno, qui dessine aussi à la main <>
Message 3 of 10
Anonymous
in reply to: Anonymous

sorry i have a bad habbit of being vague in my questions
what im trying to obtain is this

(setq ab ("@"))
Message 4 of 10
Anonymous
in reply to: Anonymous

andrew_nao a écrit :
> sorry i have a bad habbit of being vague in my questions
> what im trying to obtain is this
>
> (setq ab ("@"))

you must let a ' in front of ("@"), like that:
(setq ab '("@"))


--
Bruno, qui dessine aussi à la main: <>
Message 5 of 10
Anonymous
in reply to: Anonymous

Just try it. When I do, I get

Command: (setq ab ("@"))
; error: bad function: "@"

Do you mean to set a value to a text string containing only that one
character? If so, leave out the inner parentheses.

Command: (setq ab "@")
"@"

Command: !ab
"@"

--
Kent Cooper


wrote...
sorry i have a bad habbit of being vague in my questions
what im trying to obtain is this

(setq ab ("@"))
Message 6 of 10
Anonymous
in reply to: Anonymous

Kent,

This; (setq ab '("@")) returns
("@")

Now what he is going to do with it?

W. Kirk Crawford
Tularosa, New Mexico

"Kent Cooper" wrote in message news:5478096@discussion.autodesk.com...
Just try it. When I do, I get

Command: (setq ab ("@"))
; error: bad function: "@"

Do you mean to set a value to a text string containing only that one
character? If so, leave out the inner parentheses.

Command: (setq ab "@")
"@"

Command: !ab
"@"

--
Kent Cooper
Message 7 of 10
Anonymous
in reply to: Anonymous

(setq ab (chr 64))

Bob
Message 8 of 10
Anonymous
in reply to: Anonymous

That works, too -- it's the same as my offering of:
(setq ab "@")
resulting in "@".

But the OP hasn't said what they want to use it for, so depending on the
answer to that, Kirk's version that results in ("@") might be the "right"
way to go.
--
Kent Cooper


wrote...
(setq ab (chr 64))

Bob
Message 9 of 10
Anonymous
in reply to: Anonymous

Sure.. as is also the case for any other
character or symbol that has no special
meaning in LISP (e.g., (, ), ', " etc...).

(setq @ "hello")

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5478032@discussion.autodesk.com...
can i setq the @ symbol?

is it possible?
Message 10 of 10
Anonymous
in reply to: Anonymous

thanks for the replies,
whay i was after is a more simple and cleaner way to do the following

(defun c:sctxt ()
(Setvar "Cmdecho" 0)
(Setq AA (Entsel "\nSelect Text"))
(Setq A (Car AA))
(Setq B (Entget A))
(Setvar "Orthomode" 1)
(Setq P1 (Cdr (Assoc 10 B)))
(command "scale" AA "" p1 "R" "@" pause)
)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost