map_pltblklist

Land Desktop Development ARX CPP SDK

Up a level
map_pltblklist
 
 

Gets a list of valid plot layouts for the current work session.

struct resbuf

*map_pltblklist(

);

Returns a result buffer of block names or NULL

You must release the resbuf.

This function returns the plot layout (block) names that are usable as plot layouts. To qualify, a block must have at least one unique viewport on one of its layers. That is, if the block has more than one viewport, it must have one layer that contains only one viewport.

The unique viewport can share its layer with objects of other types, such as lines, polylines, blocks, and text.

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

struct resbuf* pLayoutBlockNameRb = NULL;
pLayoutBlockNameRb = map_pltBlkList();
if(pLayoutBlockNameRb != NULL) {
    acutPrintf(
        "\nThe plot layout block is named: %s."
        , pLayoutBlockNameRb->resval.rstring);
}
else {
    acutPrintf(
        "\nNo plot layout blocks are defined.");
}
acutRelRb(pLayoutBlockNameRb);