rayg11757 Posted January 18, 2013 Posted January 18, 2013 When I run the following autolisp line of code I get the following message: Program ERROR: AutoCAD variable setting rejected: "HPMAXAREAS" 0 (setvar "HPMAXAREAS" 0) 1. Setting the HPMAXAREAS system variable to 0 sets the hatch pattern back to the legacy setting. 2. I can change the value from the command line, either by typing the variable name HPMAXAREAS or through the AutoCAD setvar command. 3. Best I can tell, the variable HPMAXAREAS is an integer and is not read only. 4. The lisp code does not work in modespace or paperspace. Thank you for any suggestions. Quote
BIGAL Posted January 18, 2013 Posted January 18, 2013 The help says the variable is saved in the registry maybe change it there have to find it first search here for registry will give lisp code to do and need to use regedit to find BUT BE CAREFULL yep set to 100 Quote
rayg11757 Posted January 18, 2013 Author Posted January 18, 2013 I think I answered my own question. For whatever reason, the "setvar" lisp command does not seem to work with the HPMAXAREAS variable, but I was able to use AutoLISP "command" function instead. (setq hpmax (getvar "hpmaxareas") ;obtain initial value: default 100 (command "setvar" "hpmaxareas" 0) ;set the system variable to 0 [program code] (command "setvar" "hpmaxareas" hpmax) ;reset system variable to original Quote
BIGAL Posted January 19, 2013 Posted January 19, 2013 WEll done much simpler than changing registry. Quote
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.