After migrating to 2016 AutoCAD from 2014 some of my old AutoLISP functions failed. After hours of trial-and-error debugging I found the Osnap function entity identifiers have changed and some of the old ones (QUI specifically) cause the function to fail. As this function is usually deeply buried in low-level routines for user input (without error handling, my bad) it was especially hard to find.
I looked through the changes to commands and system variables but didn't see this one. The on-line Help for AutoLISP functions doesn't list the valid identifiers - the in-app Help does, if you keep checking the related references at the bottom. I don't even remember what QUI was for (Quit?) - quadrant is QUA. This function shouldn't Fail just because it doesn't like one of the arguments in the string!
Valid codes are: END, MID,CEN,GCE,NOD,QUA,INT,EXT,INS,PER,TAN,NEA,APP,PAR, and NON (for none).
Hope this helps someone.
Now I need to find out what the ._ command prefix does. Some code examples have it and others don't and I haven't found it's explanation. None of my calls have it and seem to work OK.
The _ underscore prefix invokes AutoCAD's native English command name.
The . period prefix invokes the original AutoCAD command in case it's redefined.
PS: Doing a google search you'll find this has been answered many times:
Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store
Re the underscore prefix: running the original English version is what it claims to do, but I'd recommend some caution trusting that.
I had one bad experience - trying to install a largish (about 50000 lines) Lisp program, written religiously using ._ prefixes - onto an Italian-language AutoCAD Mechanical 2009. After hitting the twentieth command which didn't work I gave up. Even if the command name worked, the parameter names didn't.
--
@Anonymous wrote:
Re the underscore prefix: running the original English version is what it claims to do, but I'd recommend some caution trusting that.
I had one bad experience - ... using ._ prefixes - onto an Italian-language AutoCAD ....
Maybe I'm misunderstanding what you're describing, but I wouldn't expect it to work if what you did was to add underscore prefixes to Italian command and option names. I believe it's adding them before the English terms that allows code written in English to run in other-than-English-language versions of AutoCAD, without needing to change all those terms to the other language's wording.
@Anonymous wrote:
.... I don't even remember what QUI was for (Quit?) ....
QUI was for QUICK. The idea was that if you combined it with some other mode, such as if you put QUI,END in, and picked on some location, it would grab onto the first ENDpoint that it found, and wouldn't take the time to evaluate possible multiple ENDpoints within the Aperture box, to determine which was closest to the pick point. You would use it when you were sure it would find the place you wanted that way, i.e. when you were going to pick at a place without any Osnap ambiguity. It may have mattered somewhat back when computers were much slower than they are today, but even then I never really used the QUI mode. If it's no longer supported, it's probably because of the vast increases in processing speed since then -- you would probably never notice the difference.
Great Thank you I didn't take time to dust off the old books and look it up.
Interesting that QUI causes the function to fail now.
Yes, you misunderstood it. The program was written in the English version of AutoCAD, I was trying to transfer it to our Italian factory.
So, we had to tell them to install the English version for this application.
--
I just spent about 4 hours realizing this new fact while updating some lisp for 2017 products... I know, slow, but it'd help if autodesk had some out of the box lisp reference that would go as deep as you needed. Maybe like a reference book with the software. Oh, that was R14.
Thanks for the tedious confirmation, though.
I think I went through this before, just recently. The value of quick to me had nothing to do with processing speed. Instead, it helped me to select the end (whatever) of the newest entity in the pick area. When you've got a drawing full of contours and pipes and stuff, and you're working on the proposed layout or grading, you always wanted to snap to the most recently created entity. There's no point to inserting a manhole at the endpoint of a contour or right-of-way line.
Now if Autodesk got rid of the option because quick is permanently built in, then fine. Otherwise I will remain quite upset (actually only if I ever get back to work somewhere). Guess it won't make any difference if I'm just stocking shelves or driving for Uber.
John F. Uhden
Can't find what you're looking for? Ask the community or share your knowledge.