ade_dsisnested

Land Desktop Development ARX CPP SDK

Up a level
ade_dsisnested
 
 

Checks if a drawing has nested drawings.

int

ade_dsisnested(

ade_id dwg_id);

Returns ADE_TRUE if the drawing has drawings attached, or ADE_FALSE.

dwg_id The drawing ID of the drawing to check.

If the drawing ID has the value ADE_NULLID, the current drawing is checked to see if it has drawings attached.

Verify that the drawing in question is active before calling ade_dsisnested. It is not possible to determine if an inactive drawing has nested drawings. If dwg_id is not specified or is NULL, the function checks the current drawing to see if it has drawings attached.

The following sample checks the current project for attached drawings using ade_dslist() and if they exist the attached drawing is checked for attached, (nested) drawings using ade_dsisnested(). Status messages are displayed based on the result of the checks and the resbuf is released as required.

ade_boolean bAllNestedDwgs = ADE_FALSE;
struct resbuf* pAttachedDwgListRb = ade_dslist(
                                      ADE_NULLID,
                                      bAllNestedDwgs);

if (NULL != pAttachedDwgListRb) {
    ade_id dwgId = pAttachedDwgListRb->resval.rreal;
    int nNestedDwgs = ade_dsisnested(dwgId);
    if (nNestedDwgs) {
        acutPrintf(
            "\nThe current project has an attached drawing which has a drawing attached to it.");
    }
    else{
        acutPrintf(
            "\nNo nested drawings were found.");
    }
}
else{
    acutPrintf(
        "\nNo drawings were attached to the current project.");
}
acutRelRb(pAttachedDwgListRb);