ade_saveobjs

Land Desktop Development ARX CPP SDK

Up a level
ade_saveobjs
 
 

Saves objects queued for saving back to the source drawings.

int

ade_saveobjs(

struct resbuf* priorities);

Returns RTNORM or an error code.

priorities List containing one to four save back operation codes, depending on the number of save back operations you are specifying. List the codes in order of their relative priority. See the Save-Back Operation Codes table below.
Save-Back Operation Codes
CodeOperationDescription
1 Came From Saves objects to their source drawings.
2 Selective Saves objects you select to the drawings you specify.
3 Layer Saves objects to layers in the source drawings that use the same names as those in which the objects lie.
4 Area Saves objects to the source drawing within whose extents they lie, even if only partially within.

During the save back operation, the options are executed in the order specified in the priorities list. The list must contain at least one option. For example:

The following example creates a resbuf containing save-back operation code(s). Ade_saveobjs() uses this resbuf and returns RTNORM if successful. Status messages are displayed based on the returned code. Then it releases the resbuf, as required.

struct resbuf* pSaveBackPriorityRb = acutBuildList(RTSHORT, 1, 0);
int returnCode = ade_saveobjs(pSaveBackPriorityRb);
if (RTNORM == returnCode) {
    acutPrintf(
        "\nObjects were successfully saved.");
}
else {
    acutPrintf(
        "\nObjects were not saved.");
}
acutRelRb(pSaveBackPriorityRb);

To save a selection set to a specific drawing, use ade_savetodwg.