Category Drawings and detail, Object ProDrawing

Function ProDrawingFromTmpltCreate


SUPERSEDED BY: ProDrawingFromTemplateCreate
Description
Creates a new drawing from a template This API will be deprecated in future release.
Synopsis
#include <ProDrawing.h>
ProErrorProDrawingFromTmpltCreate(
ProName new_name
/* (In)
The name for the new drawing
*/
ProName dwg_template
/* (In)
The name of the drawing template
*/
ProModel* new_model
/* (In)
The name and type of the solid model to be used in the new drawing.
*/
ProDwgcreateOptions options
/* (In)
Flags for drawing creation. Options include:
  • PRODWGCREATE_DISPLAY_DRAWING: display new drawing in a window.
  • PRODWGCREATE_SHOW_ERROR_DIALOG: display template error dialog to the user.
  • PRODWGCREATE_WRITE_ERRORS_TO_FILE: write errors to disk file.
*/
ProDrawing* drawing
/* (Out)
The new drawing
*/
ProDwgcreateErrs* errors
/* (Out)
The list of warnings and errors caused by the creation.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully created the drawing, without errors.
PRO_TK_E_FOUNDThe drawing with name new_name already exists.
PRO_TK_E_NOT_FOUNDThe template and/or the drawing model was not found.
PRO_TK_INVALID_NAMEThe template and/or the drawing model name is not valid.
PRO_TK_DWGCREATE_ERRORSThe function created the drawing, but there were one or more errors.
PRO_TK_NO_PERMISSIONThe function does not have permission to open the template or the solid model.

Manual References:

  1. Drawings: Creating Drawings from Templates
  2. Drawings: Creating Drawings from Templates
  3. Core: Models and Model Items: Creating Models
  4. Core: Models and Model Items: Creating Models

Sample Code References:

  1. pt_userguide ( UgDrawingFromTmpltCreate.c )