ade_dwgactivate

Land Desktop Development ARX CPP SDK

Up a level
ade_dwgactivate
 
 

Activates a drawing.

int

ade_dwgactivate(

ade_id dwg_id);

Returns RTNORM or an error code.

dwg_id Drawing ID.

You can attach a drawing that does not yet exist, but you cannot activate it. See ade_dsattach.

The following sample gets a list, (resbuf) containing drawing IDs of drawings directly attached to the current project, (no nested drawings) using ade_dslist(). If attached drawings exist, the list is processed and each drawing in the list is deactivated using ade_dwgdeactivate(). The resbuf is then released as required.

struct resbuf* pAttachedDwgsRb = ade_dslist(ADE_NULLID, ADE_FALSE);
int resultCode = RTERROR;
if (NULL != pAttachedDwgsRb) {
    struct resbuf* rb = pAttachedDwgsRb;
    while(NULL != rb) {
        resultCode = ade_dwgdeactivate(rb->resval.rreal);
        rb = rb->rbnext;
    }
}
else {
    acutPrintf(
        "\nThere are no attached drawings in this project.");
}
acutRelRb(pAttachedDwgsRb);