AIberto Posted January 26, 2015 Share Posted January 26, 2015 Hello,guys I Want add more information to make QRCODE. I've done a little bit of searching for this, but have not found what I've needed. This is a DEMO (defun c:tt() (setq str "1111111011101101001111111-1000001011100101001000001-1011101010110110001011101-1011101011010011001011101-1011101000000110101011101-1000001010011101101000001-1111111010101010101111111-0000000001001100000000000-1100111000010011000101111-0111110111101100101001110-1001101000011010010101011-0101010110110111001111001-1101111100101100110100111-1111010100000001001111110-0000011111000000101000101-0000000111001100111000001-1110101100010011111110001-0000000011101100100011101-1111111000111111101010101-1000001010010110100011001-1011101011101011111110111-1011101001100001110110111-1011101001100011010111110-1000001010101011001101010-1111111011111111110011111" ) (setq pt0 (getpoint "\nSpecify base point:")) (setq pt0 (polar (polar pt0 (/ pi 2) 0.5) pi 1.0)) (setq str0 str ls1 nil ) (while (wcmatch str0 "*-*") (setq n (vl-string-search "-" str0) ls1 (cons (substr str0 1 n) ls1) str0(substr str0 (+ 2 n)) ) ) (setq ls1 (reverse (cons str0 ls1)) ls1 (mapcar 'vl-string->list ls1)) (mapcar '(lambda(y) (setq pt1 (polar pt0 (/ pi -2) 1.0) pt0 pt1 ) (mapcar '(lambda(x) (setq pt1 (polar pt1 0.0 1.0)) (if (= x 49) (mkpl pt1) ) ) y ) ) ls1 ) (princ) ) (defun mkpl(pt) (entmake (list '(0 . "lwpolyline") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 2) '(43 . 1.0) (cons 10 pt) (cons 10 (polar pt 0.0 1.0)) ) ) ) But can only make a fixed information . I want Enter more information, like this: Enter information: xxxxxxx , [Next/ Done] , N (Enter the next one) Enter information: xxxxxxx [Next/Done] , D (Finish) I found some …… maybe can help . http://www.theswamp.org/index.php?topic=44091.msg493463#msg493463 Lee's function ,Thanks. (defun int2hex ( n ) (cond ( (< n 10) (chr (+ n 48))) ( (< n 16) (chr (+ n 55))) ( (strcat (int2hex (/ n 16)) (int2hex (rem n 16)))) ) ) (defun str->url ( s ) (apply 'strcat (mapcar (function (lambda ( a ) (cond ( (or (<= 65 a 90) (<= 97 a 122) (member a '(45 46 95 126))) (chr a)) ( (= a 32) "+") ( (< a 16) (strcat "%0" (int2hex a))) ( (strcat "%" (int2hex a))) ) ) ) (vl-string->list s) ) ) ) Can help me ? or Will you share what you've written to do that? Thanks very much! Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted January 26, 2015 Share Posted January 26, 2015 This doesn't answer your question, but I just wanted to point you to a completed routine to create QRCodes: http://cadtips.cadalyst.com/standard-blocks/create-qr-codes Quote Link to comment Share on other sites More sharing options...
AIberto Posted January 26, 2015 Author Share Posted January 26, 2015 This doesn't answer your question, but I just wanted to point you to a completed routine to create QRCodes: http://cadtips.cadalyst.com/standard-blocks/create-qr-codes Thank rkmcswain, This program is the same as I send links in the above post I have used, mobile scan is Garbled. Quote Link to comment Share on other sites More sharing options...
AIberto Posted January 27, 2015 Author Share Posted January 27, 2015 I don't know why garbled(unreadable codes) , ??? :cry: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.