GetVariable Method

Back to Methods Reference

Gets the current setting of an AutoCAD system variable.

Signature

VBA : RetVal = object.GetVariable(Name)

VL : RetVal = (vla-GetVariable object Name)

(vla-GetVariable thisdrawing "OSMODE")

  • Object : Document
    The object or objects this method applies to.

  • Name : String; input-only
    The name of the variable to return. Must contain a valid system variable name (the case of the characters is not significant).

  • RetVal : Variant
    The value of the specified system variable.

Remarks

For a list of all the AutoCAD system variables and their types, please refer to System Variables.

Example :


(defun c:al-getvar ()

(vl-load-com)

(setq thisdrawing (vla-get-activedocument 
                       (vlax-get-acad-object)))

(setq thevar (vla-GetVariable thisdrawing "OSMODE"))

(princ thevar)

(princ)

);defun

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website