QAFLAGS System Variable

For some reason lately, I have been running into an obscure system variable that is wrecking havoc on certain AutoCAD commands, or so it may seem. Some of you may have heard of QAFLAGS. I first ran across it years ago at manusoft.com, where Owen has provided documentation (not sure if that is his own description, or something originally from Autodesk...). The default value is 0. I've been using it for years to bypass the pause in text screen listings (bitcode 2).

Note that because it is a bitcoded system variable, you can set it to any valid value such as 384 (128+256), 1538 (1024+512+2), 32767, etc., however the effects of these other bits are undocumented, if they do anything at all.

Below I will attempt to document other known effects. I run across these just infrequently enough to forget them in the meantime, so now I'll have a reference.

  • If bit 1 is set and you execute certain commands while objects are selected and gripped, the selection is canceled and the grips vanish. ._Copyclip is one of these commands.
  • In Autolisp, if you preselect some items using (sssetfirst) and wish to explode them using the ._Explode command, you will need to set bit 1 of QAFLAGS, otherwise the selection is canceled before the command executes (this may be AutoCAD version specific). Some more information on QAFLAGS and Explode can be found in this discussion thread at the AUGI forums.
  • If you are calling the ._Copy command using Autolisp and QAFLAGS = 0, then the copy command will operate in single copy mode. If bit 1 is set, it will operate in multiple copy mode.

I'm fairly certain I'll run across more of these issues and I'll update this page at the time. Please leave a comment if you have run across something I have missed.

Here is a post from the Mistress of the Dorkness on this topic also.

Here is some good information on command versioning that can be used instead of the QAFLAGS trick in certain situations.

Comments

To better understand this sysvar, it's helpful to know that it was added to make automated testing possible. Some of its effects may seem rather peculiar unless you understand their underlying purpose. BTW, the information on my site is entirely my creation except where noted.

Thanks for the additional info Owen.

Autodesk made QAFLAGS=2 known in 1992 on the CompuServe ACAD forum, as the workaround for the text-screen pause they introduced in R12. As it was obvious that users (and not just Autodesk testers) would need to control this feature, it should never have been controlled by an undocumented variable. But there you go; a mistake from ancient history is still with us today.

More good info, thanks Steve.

 


All content is copyright © CAD PANACEA 2005-2013 unless otherwise noted and may not be reproduced. All comments posted to this blog are the sole responsibility of the person making the comment.

Google, as a third party vendor, uses cookies to serve ads on this site. Google's use of their cookies enables it to serve ads to users based on their visit to your sites and other sites on the Internet. You may opt out of the use of these cookies by visiting the Google ad and content network privacy policy.

Powered by Drupal