Prototype
bool __cdecl fnPreExport(size_t nCurrentLayerIndex, const char* pszCurrentLayerName, ShapeType type, size_t nShapeCount, size_t nAttributeCount, PFNATTRIBUTENAMECALLBACK pfnANCB);
Return value
This function should return true if export of current theme should continue, and false otherwise.
Parameters
nCurrentLayerIndex [in]
Zero-based sequence index of the theme to be exported.
pszCurrentLayerName [in]
Name of the current layer as shown in ShapeUp.
type [in]
The A ShapeType value describing what type is being exported.
nShapeCount [in]
The total number of shapes in this layer.
nAttributeCount [in]
The number of attributes available for each shape.
pfnANCB [in]
A callback function of type PFNATTRIBUTENAMECALLBACK. This function may be called to get the name of an attribute.
Remarks
This function is optional, but can if implemented be used to prepare data storage, or e.g. to query the user for a file name where data should be stored.
If this function returns false, ShapeUp will move on to export the next selected theme.
If this function returns true, fnExportShape will be called for each shape in the layer.
Notice: If using MFC, be sure to start the function with AFX_MANAGE_STATE(AfxGetStaticModuleState());
Example
bool __cdecl fnPreExport(size_t nCurrentLayerIndex, const char* pszCurrentLayerName, ShapeType type, size_t nShapeCount, size_t nAttributeCount, PFNATTRIBUTENAMECALLBACK pfnANCB) { os.open("path\\filename.extension"); os << "Exporting layer " << pszCurrentLayerName << '\n'; os << "Containing " << nShapeCount << " shapes\n"; return true; }
See Also
Exporter API, fnGetLastErrMsg, fnExportShape, fnBatchExportBegin, fnBatchExportEnd, fnPostExport