map_pltcurrget

Land Desktop Development ARX CPP SDK

Up a level
map_pltcurrget
 
 

Gets an attribute value for the current plot set.

int

map_pltcurrget(

char *attr,

struct struct resbuf **res);

Returns RTNORM or RTERROR.

attr The name of the plot set attribute to retrieve.
res Resbuf containing the value of the attribute.

This function retrieves the value of a specific attribute for the current plot set. The data type of the return value depends upon the attribute. To set plot set attributes, use map_pltdefget.

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

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

char* pszPlotSetAttrb = "name";
struct resbuf* pPlotSetAttrbValueRb = NULL;
int returnCode = map_pltCurrGet(pszPlotSetAttrb, &pPlotSetAttrbValueRb;);
if (RTNORM == returnCode){
    acutPrintf(
        "\nThe plot set attribute \"%s\" contained the following value: \n\t\"%s\""
        , pszPlotSetAttrb, pPlotSetAttrbValueRb->resval.rstring);
}
else {
    acutPrintf(
        "\nThe plot set attribute \"%s\" contained no value."
        , pszPlotSetAttrb);
}
acutRelRb(pPlotSetAttrbValueRb);