map_pltcurrset

Land Desktop Development ARX CPP SDK

Up a level
map_pltcurrset
 
 

Sets the value of an attribute for the current plot set.

int

map_pltcurrset(

char attr,

struct resbuf *res);

Returns RTNORM or RTERROR.

attr The name of the plot attribute to set.
res Pointer to resbuf for attribute value.

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

The following sample creates a resbuf containing a value representing the plot set description. Map_pltCurrSet() is called with all required parameters, if the operation is successful the plot set attribute name and the updated value are displayed. The resbuf is then released as required.

char* pszPlotSetAttrb = "desc";
struct resbuf* pPlotSetAttrbValueRb = acutBuildList(
                                        RTSTR,
                                        "A new plot set description",
                                        0);
int returnCode = map_pltCurrSet(
                    pszPlotSetAttrb,
                    pPlotSetAttrbValueRb);
if (RTNORM == returnCode){
    acutPrintf(
        "\nThe plot set attribute \"%s\" has been set to the following value: \n\t\"%s\""
        , pszPlotSetAttrb, pPlotSetAttrbValueRb->resval.rstring);
}
else {
    acutPrintf(
        "\nThe plot set attribute \"%s\" was not set."
        , pszPlotSetAttrb);
}
acutRelRb(pPlotSetAttrbValueRb);