fnExportShape


Prototype

bool __cdecl fnExportShape ( ExportShapeInfo *pInfo ); 

Return value

This function should return true if the shape could be exported. If false is returned, the exporting operation is stopped.

Parameters

pInfo

Pointer to a ExportShapeInfo structure.

Remarks

This function handles the storing of a single shape from the ShapeUp application. This function gets called once for each shape in each layer being exported, and the plug-in can store each shape in turn.

If false is returned, the function fnGetLastErrMsg is called, and it should return a description of the error. The functions fnPostExport, and fnBatchExportEnd are always called after the calls to fnExportShape regardless of the returned value.

Example

bool __cdecl fnExportShape ( ExportShapeInfo *pInfo )
{
    if (nAttributeCount >= 1)
    {
        std::string str;
        /* Get first attribute name */
        str = pInfo->pfnANCB(0);
        str += ": ";

        /* Get first attribute */
        str += pInfo->pfnACB(pInfo->pShape->GetIndex(), 0);
        return true;
    }
    /* set error message */
    pwszErr = L"This exporter cannot export layers without attributes.";
    return false;
} 

See Also

Exporter API, fnGetLastErrMsg, ExportShapeInfo