CreateCADEx

  Functions >

CreateCADEx

Previous pageReturn to chapter overviewNext page

The CreateCADEx function creates a new CADImage object and loads data into it from the specified file.

 

Syntax:

 

HANDLE CreateCADEx(

  HWND hWindow,   // handle of the application main window

  LPCSTR lpFileName,  // pointer to the file name

  LPCSTR lpExt

);

 

 

Parameters:

 

hWindow

Identifies the window that will get system messages during the file loading. Usually it is the main window of the client's application. If no file is specified, hWindow can be NULL.

lpFileName

Points to a null-terminated string that specifies the CAD file name to be loaded. If this parameter is NULL, no file is loaded and the empty CADImage object is created.

lpExt

Points to a null-terminated string that specifies an extension for the CAD file name to be loaded.

 

   

Return Value:

If the function succeeds, the return value is a handle of a new CADImage object.

If the function fails, the return value is NULL. To get extended error information, call GetLastErrorCAD.

 

 

Note:

If lpExt is equal to one of the following extensions: ( '.dxf', '.dwg', '.plt', '.hgl', '.rtl', '.hg', '.plo', '.hp', '.hp1', '.hp2', '.hpg', '.hpgl', '.hpgl2', '.gl2', '.prn', '.spl', '.svg', '.cgm'), then the file specified by lpFileName and lpExt will be loaded to the created CADImage object.

If lpExt is not equal to them, then the extension in lpFileName will be checked. If it will be equal to one of the mentioned above, then the file specified in lpFileName will be loaded to the created CADImage object.

If extension in neither lpExt nor lpFileName is equal to the one of the mentioned above extensions, then the function fail.

The lpExt parameter is ignored if the filename in the lpFileName parameter is specified with extension.

 

 

See Also

CloseCAD  | CreateCAD  | StopLoading


© 2003-2024 CADSoftTools

Go to CAD DLL