L_VecLoadLayout

Summary

Loads the specified layout from the specified file. Currently only DXF files support layouts.

Syntax

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecLoadLayout(pszFile, pVector, nLayoutIndex, pLayoutInfo)

Parameters

L_TCHAR pszFile

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

pVECTORHANDLE pVector

Pointer to a vector handle referencing the loaded image.

L_INT nLayoutIndex

A zero-based index of the layout to load. Pass 0 to load the first layout, 1 to load the second layout, etc.

pLAYOUTINFO pLayoutInfo

Pointer to a LAYOUTINFO structure to be updated with information of loaded layout. Pass NULL for this parameter if layout information is not needed. If this parameter contains a valid pointer to a LAYOUTINFO structure, the uStructSize member should be set to the sizeof (LAYOUTINFO) before calling this function.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Loads a vector image into a vector handle. The file can be any vector file format that supports layouts (currently DXF).

The L_VecLoadLayout function initializes the vector handle and allocates the storage necessary to hold the vector image.

Since the function allocates storage to hold the image, it is up to the user to free this storage by calling the L_VecFree function.

You should never pass an uninitialized FILEINFO structure to this function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example loads a specific layout from a vector image. Currently only DXF files support layouts

L_LTVKRNTEX_API L_INT VecLoadLayoutExample(L_VOID) 
{ 
   VECTORHANDLE   LeadVector; /* Vector handle to hold the loaded image. */ 
   L_INT          nRet;       /* Return value. */ 
   LAYOUTINFO     LayoutInfo; /* Layout info */ 
 
   /* Load layout 1 of vector image. */ 
   nRet = L_VecLoadLayout(MAKE_IMAGE_PATH(TEXT("FILE1.DXF")), &LeadVector, 1, &LayoutInfo ); 
 
   if( nRet != SUCCESS ) 
      /* There was an error loading the vector image. */ 
      MessageBox( NULL, TEXT("Could not load file!"), TEXT("Error"), 0 ); 
 
   return nRet; 
} 

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.