I don't know what I'm doing wrong, but I obtained the lisp "qrcode" from http://www.swisscad.com/products.php?lang=en&product=qrcode but it seems that it's not creating the qrcode.dwg block as I'm getting an error in the ACAD text box saying "cant find file in search path". It then lists all my support file paths.
I've searched the net for a fix or better lisp, but what amazes me is that there is next to nothing on these forums on the topic, and this lisp is about a year and a half old!
Thanks
Is this lisp trying to insert block "qrcode" before it's even been created?
Mark Green
Working on Civil 3D in Canada
You might find this thread of interest:
Thanks Jeff, I did come across that site in my searches, but what I was looking for was a complete lisp package that I could use. It seems that the other posters on this site don't have a problem with the code (which looks to be the same as what I've been trying), but I can't get it to work as intended and don't know why.
I'm beginning to feel the heat telling me I need to increase my KSA's as they relate to lisp, vba, ect. and this may be part of that road (any tutorial sites you could recommend?). But for now, could you tell me if there's something on my end that's causing the routine to fail (see attached)?
All of the QR code generators I've seen for CAD rely on an internet call to generate an image, which is connected to a block definition, which is then inserted into the drawing. Haven't looked at the code, but I suspect the block and/or downloaded image is being placed in a hard-coded directory (perhaps user local TEMP folder?) which isn't in the standard search paths. Try searching the "standard" temporary file repositories on your computer for the indicated block.
My problem seems to be where the "block" is being stored or if it's even being created. The lisp text seems to call for the block before it's even been created. I'm not familiar with this, so I can't say if this is normal or not. The code's been around for a while so I wouldn't think that it would have any syntax errors, especially since a coworker claims to have gotten it to work . . .
I don't know how your co-worker got it to work. Evidently something has changed in the generator used by the lisp. This is the first line of text retrived from the code generator:
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
This is the line of code in the lisp which it uses to verify a valid file was obtained:
((eq (substr QR 1 6) "111111");response OK
which is checking if the first line's first 6 characters are 111111. Obviously this is not the case since the first 6 characters are <!DOCT so the command ends and no block is created.
Edit! I looked at the entire string returned from the php web page, looks like it's been removed or taken off of public access:
<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"><html><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1><p>You don't have permission to access /tests/getqrcod
Thanks for translating that Jeff. I'd sooner be able to read Chinese than determine what was going on in there!
So would swapping in a viable website fix things?
@bcsurvey wrote:
So would swapping in a viable website fix things?
I'm sure it would. But I suspect that this lisp was written based on specific PHP code for that specific website. So finding another link that gives the same output may not be such an easy task. But since I don't use these QRcodes, I really have no idea if one exists or not. You might try writing the original author of the lisp. Although he didn't include an email address in the code, a quick Google search found him on Twitter, Facebook, LinkedIn and a contact page at Swisscad.com