I am new in Creo Customization , I am struck in creating of drawing template from ProDrawingFromTemplate function , I passed all valid arguments but still it returns error of PRO_TK_E_NOT_FOUND , I need help to create drawing template , I have attached code screenshot for your reference
I don't see where you are setting the value of template name, line 56 and 57. The actual name of the template. You are probably using the sample code like I did, and in the sample (and in my code) I call UsrDrawingCreate passing the actual name. also see that TEMPLATE_NAME is the argument for my function.
another thing: see that your template.drw actually exists, in your start model directory, and the the config.pro option start_model_dir is set to the correct place.
PURPOSE: Creates a drawing for the current model.
int UsrDrawingCreate(char TEMPLATE_NAME)
ProError err, status;
I have declared template name global which is "c_drawing" , still it giving error.
I guess the “model” handle is invalid, try “solid_mdl” for testing in the function call to create the drawing via template, this must work if your current model is a solid.
Or use ProSolidMdlnameInit (ProSolidInit is depri) to init a valid solid handle. I thought a function for testing like IsSolid is available, but I’m not sure ( not at my desk😵💫). In you case you need to extract the int type of the model on top, to feed that function and to get a valid result.
Thank you , it is working , successfully created drawing template , but primary views are not created , it giving error of PRO_TK_E_General at ProDrawingFromTemplate , If you have sample code , please share with me