UserS Usage

UserS Usage

GeryKnee
Advocate Advocate
386 Views
3 Replies
Message 1 of 4

UserS Usage

GeryKnee
Advocate
Advocate

Hi to all
Something is going wrong here:


(setvar "USERS5" "MyString")
(setq St (getvar "USERS5")) 
(princ St)
(princ)

 

"MyString" string value expected but #<SUBR @0941d1a4 USERS5> returned

 

Thanks,

Gery

 

0 Likes
387 Views
3 Replies
Replies (3)
Message 2 of 4

Moshe-A
Mentor
Mentor

@GeryKnee , welcome back 😀

 


@GeryKnee wrote:

Hi to all
Something is going wrong here:


(setvar "USERS5" "MyString")
(setq St (getvar "USERS5")) 
(princ St)
(princ)

 

"MyString" string value expected but #<SUBR @0941d1a4 USERS5> returned

 

Thanks,

Gery

 


Noting wrong with this code, works prefect for me. if the return value is like you said, make sure you do not set a function name to variable.

 

Moshe

 

0 Likes
Message 3 of 4

timothy.birdwell
Enthusiast
Enthusiast

I got the same result as Moshe-Aresult.jpg 

0 Likes
Message 4 of 4

john.uhden
Mentor
Mentor

@GeryKnee ,

Works fine in ACAD2002.

Try changing "USERS5" to 'USERS5.

You shouldn't have to, but I'm just curious as to why your anomaly.

John F. Uhden

0 Likes