Setting attdia, filedia, blipmode, etc....

Discussion in 'AutoCAD' started by David Allen, Aug 10, 2004.

  1. David Allen

    David Allen Guest

    historically I have set these variables at startup via lisp with something like
    (if (= (getvar "blipmode") 1)(progn
    (princ "\nDisabling Blips (BLIPMODE to 0)\n")
    (setvar "blipmode" 0)))

    I have now been setting config settings via VL like
    (vla-put-TempFilePath AFILES (getenv "temp"))

    so for a startup routine to set common variables, whats the best way to do it?
    Can I use VL to set things like attdia, filedia, blipmode, etc.....


    David
     
    David Allen, Aug 10, 2004
    #1
  2. David Allen

    Jürg Menzi Guest

    Hi David
    I wouldn't...
    The vla thingis are working with variants:
    _$ (setq OldOsm (vla-GetVariable *AcadDoc* "OSMODE"))
    #<variant 2 535>
    You've to convert them...
    (ok, not necessary if you use the value to reset the old state):
    _$ (setq OldOsm (vlax-variant-value (vla-GetVariable *AcadDoc* "OSMODE")))
    535
    Another way is to use vlax-invoke:
    _$ (vlax-invoke *AcadDoc* 'GetVariable "OSMODE")
    535
    But - last not least why not using the easiest way?
    (getvar "OSMODE")
    535

    Cheers
     
    Jürg Menzi, Aug 10, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.