map_pltblkvps

Land Desktop Development ARX CPP SDK

Up a level
map_pltblkvps
 
 

Returns a list of valid viewport layers in a specified layout blocks.

int

map_pltblkvps(

char *name,

struct struct resbuf **res);

Returns RTNORM if the list is initialized or RTERROR if the block name or layout block is invalid.

name Layout block name.
res Pointer to pointer to result buffer of viewport layers.

If the function returns RTNORM, you must release the resbuf.

The following sample populates a resbuf with plot layout block viewport layer name(s) using map_pltBlkVps(). If the operation is successful the viewport layer name(s) are displayed, and the resbuf is released as required.

char* pszLayoutBlockName = "TITLE-A";
struct resbuf* pLayoutBlockVportLayerRb = NULL;
int returnCode = map_pltBlkVps(pszLayoutBlockName, &pLayoutBlockVportLayerRb;);
if (RTNORM == returnCode){
    struct resbuf* rb = pLayoutBlockVportLayerRb;
    while(NULL != rb) {
        acutPrintf(
            "\nThe following viewport layer(s) have been found on the layout block \"%s\": %s"
            , pszLayoutBlockName, rb->resval.rstring);
        rb = rb->rbnext;
    }
}
else {
    acutPrintf(
        "\nNo viewport layers have been found on the layout block \"%s\". ");
}
acutRelRb(pLayoutBlockVportLayerRb);