L_VecGetLayoutCount

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecGetLayoutCount(pszFile, pnLayouts)

L_TCHAR pszFile;

/* filename */

L_INT *pnLayouts;

/* number of layouts*/

Gets number of layouts from a specific file. Currently only DXF files support layouts.

Parameter

Description

pszFile

Character string that contains the name of the file to load.

pnLayouts

Pointer to L_INT to be updated with number of layouts.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_VecLoadLayout

Topics:

Getting Vector Layer Information

Example

This example Gets number of layouts from a specific file. Currently only DXF files support layouts

L_INT VecGetLayoutCountExample(L_VOID)
{
   L_INT   nRet;       /* Return value. */
   L_INT   nLayouts;   /* Number of layouts */

   /* Get number of layouts in a vector image. */
   nRet = L_VecGetLayoutCount(MAKE_IMAGE_PATH(TEXT("FILE1.DXF")), &nLayouts );

   if( nRet != SUCCESS )
      /* There was an error loading the vector image. */
      MessageBox( NULL, TEXT("Could not load file!"), TEXT("Error"), 0 );

   return nRet;
}