Sets a drawing setting value.
int
ade_dwgsetsetting(
ade_id dwg_id,
struct resbuf* proplist);
Returns ADE_TRUE if the drawing is active or ADE_FALSE.
| dwg_id | Drawing ID. |
| proplist | List composed of a setting name and a value. See Setting Names below. |
| Setting name | Value |
|---|---|
| dwgname | Drawing name; a full path name, such as c:\\drawings\\mydwg.dwg. |
| dwgdesc | Drawing description. |
| t_scale | Simple transform scale. For example, 1.2 = 120% |
| t_rotate | Simple transform rotation; rotation direction depends on the AutoCAD ANGDIR setting. |
| t_xoffset | Simple transform X offset. |
| t_yoffset | Simple transform Y offset. |
| t_apply | Flag value. Values can be: 1 = apply all simple transformations defined for the given drawing 0 = do not apply transformations |
| saveback | Save back coordinates, a sequence of corner points, in this order: lower left, lower right, upper right, upper left, separated by "." |
The following sample gets a drawing ID from an attached drawing using ade_dwggetid(). This ID and the resbuf containing the setting name/value pair are used by ade_dwgsetsetting() which returns a status code whose associated message is displayed. Then it releases the resbuf, as required.
ade_id dwgId = ade_dwggetid (pszDwgPathName);
struct resbuf* pDwgSettingsRb = ads_buildlist
(
RTLB,
RTSTR, "dwgdesc",
RTSTR, "This is a drawing description",
RTDOTE,
0
);
returnCode = ade_dwgsetsetting(dwgId, pDwgSettingsRb);
if (RTNORM == returnCode) {
acutPrintf(
"\nThe value has been successfully set for %s"
,pszDwgPathName);
}
else {
acutPrintf(
"\nThe value could not be set.");
}
acutRelRb(pDwgSettingsRb);


