#define TEMPLATE_NAME "c_drawing"
/*==================================================================*\
FUNCTION: UserDrawingCreateDemo()
PURPOSE: Creates a drawing for the current model.
\*==================================================================*/
int UsrDrawingCreateDemo()
{
 roError err;
 roMdl solid_mdl;
 roMdlType mdl_type;
 roMdldata data;
 roModel model;
// ProFileName msgfil;
ProName predefined_template;
ProName name;
ProDrawing created_drawing;
ProDwgcreateOptions options = (ProDwgcreateOptions)0;
ProDwgcreateErrs errors;
created_drawing = NULL;
/*------------------------------------------------------------------*\
Set up the name of the message file.
\*------------------------------------------------------------------*/
//ProStringToWstring (msgfil, "msg_ugdrawing.txt");
/*------------------------------------------------------------------*\
Use the current model to create the drawing.
\*------------------------------------------------------------------*/
err = ProMdlCurrentGet ([$solid_mdl)]
if (err != PRO_TK_NO_ERROR)
return (err);
err = ProMdlTypeGet (solid_mdl, [$mdl_type)]
if (err != PRO_TK_NO_ERROR ||
(mdl_type != PRO_MDL_PART && mdl_type != PRO_MDL_ASSEMBLY))
return PRO_TK_INVALID_TYPE;
err = ProMdlDataGet (solid_mdl, [$data)]
/*------------------------------------------------------------------*\
Read in the root of the new name of the drawings to create.
\*------------------------------------------------------------------*/
// err = ProMessageDisplay (msgfil, "USER Enter new drawing name: ");
err = ProMessageStringRead (PRO_NAME_SIZE, name);
if (err != PRO_TK_NO_ERROR)
return (err);