Hi.
Give this a try.
Regards,Code:(read (strcat " " TUBE150X150X4.5 20.2 " "))
Tharwat


Registered forum members do not see this ad.
Please help in this issue.
(read (strcat "(" "TUBE150X150X4.5 20.2" ")"))
it returns a list
(TUBE150X150X4 20.2).
But I need a list
(TUBE150X150X4.5 20.2) including decimal point.
Yours,
Muthu.
Hi.
Give this a try.
Regards,Code:(read (strcat " " TUBE150X150X4.5 20.2 " "))
Tharwat


Here it goes very well.
load the file and type abc to start;
The outcome is (TUBE150X150X4.5 20.2)Code:(defun c:abc (/ a b c d e f g tharwat pt) (setq a "TUBE" b "150" c "X" d "150" e "X" f "4.5" g "20.2") (setq tharwat (strcat "(" a b c d e f " " g ")")) (if (setq pt (getpoint "\nSpecify placement point: ")) (entmake (list '(0 . "TEXT") (cons 40 (getvar 'textsize)) (cons 10 (trans pt 1 0)) (cons 1 tharwat) ) ) ) (princ) )
Enjoy.
Tharwat
Last edited by Tharwat; 20th Jun 2010 at 09:52 am.




I think what you need is strcat chr(x) "TUBE150X150X4.5" "20.2" chr(y)
The correct value for x as an example 13 is Carriage return 32 is space you can basicly replace any keyboard character with a number value I wrote years ago an asc lisp that gave me the number as I pressed a key.
Big hints look for HELP asc & chr in lisp help
Sorry could not find asc.lsp also known as asci key codes.
Hello muthu123
Today is your lucky day man ... my ideas are burning up promptly today.
Check this out, it is as best as the previous one.
regardsCode:(defun c:abc (/ a pt) (setq a "(TUBE150X150X4.5 20.2)") (if (setq pt (getpoint "\nSpecify placement point: ")) (entmake (list '(0 . "TEXT") (cons 40 (getvar 'textsize)) (cons 10 (trans pt 1 0)) (cons 1 a) ) ) ) (princ "Cad Tutor Forum is the best") (princ))
Tharwar
So finally.
The main problem is within the function 'read' because it doesn't except decimal
number or couldn't deal with it .
Hope that was helpful and enough .
Tharwat
Syria


Bookmarks