C++
int acedGetVar( const ACHAR * sym, struct resbuf * result );
File
acedads.h
Description
Retrieves the current value of the specified AutoCAD system variable.
The result argument must point to a resbuf structure, because the system variables consist of a variety of types.
Warning The result argument must point to an allocated resbuf (it can be static, automatic, or dynamically allocated). It must not be declared as just a pointer; if the application doesn't allocate enough space for the resbuf structure, acedGetVar() will return garbage or corrupt other data in memory.
If the requested system variable is a string value, acedGetVar() dynamically allocates the memory needed to hold the string. The ARX application is responsible for releasing this memory. This can be accomplished by a call to the C utility function free(), or by a call to acutRelRb() if the buffer used for the result argument was allocated dynamically.
This function is the complement of the acedSetVar() function.
If acedGetVar() succeeds, it returns RTNORM; otherwise, it returns an error code.
Parameters
Parameters | Description |
---|---|
sym | Input AutoCAD system variable; must contain a valid system variable name (the case of the characters is not significant) |
result | Output value of AutoCAD system variable |