C++
int acedSetVar( const ACHAR * sym, const struct resbuf * val );
File
acedads.h
Description
Sets the specified AutoCAD system variable. The val argument must point to a result buffer, because the system variables consist of a variety of types. The result buffer must be initialized and must contain a valid result type code and value that correspond to the type and values allowed for the specified system variable.
AutoCAD system variables that take integer values are 16-bit short integers. The value supplied in the val->resval.rint field of the result buffer must be between -32,768 and +32,767.
Some AutoCAD commands inspect the values of system variables before they prompt the user. If the application calls acedSetVar() while such a command is in progress, the new value may not become current until the command has completed its execution.
This function is the complement of the acedGetVar() function.
If acedSetVar() succeeds, it returns RTNORM; otherwise, it returns an error code. When acedSetVar() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure.
Parameters
Parameters | Description |
---|---|
sym | Valid system variable (case is not significant) |
val | Value to set the system variable |