cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Using the VB API to create a drawing with a custom template, getting error pfcExceptions::XToolkitNotFound'

gquiroga
12-Amethyst

Using the VB API to create a drawing with a custom template, getting error pfcExceptions::XToolkitNotFound'

Hi,

I'm trying to use the Visual Basic API to create a drawing with a custom template, but I'm getting the error message:

 

System.Runtime.InteropServices.COMException: 'pfcExceptions::XToolkitNotFound'

 

The line of code on which I get the error message is:

 

Dim drawing As IpfcDrawing = session.CreateDrawingFromTemplate(Mdl.CommonName, "D-CUSTOM", Mdl.Descr, drwnCreateOptns)

 

I tried changing the template to an out of the box template and that works, so it has to be the custom template, is there anything I'm missing?

ACCEPTED SOLUTION

Accepted Solutions
gquiroga
12-Amethyst
(To:gquiroga)

Got this solution from PTC Support:

The reported error XToolkitNotFound will be received if the specified Template Drawing (not format) “D-CUSTOM.drw” does not exist in any of the below mentioned locations

  1. 1. In the current working directory (OR)
  2. 2. Creo 3.0\MXXX\Common Files\templates\ (OR)
  3. 3. In any directory which is loaded in creo as a search_path (or through Search.pro file)

So, Could you please make sure that the template drawing file “D-CUSTOM” is located in any one of the above mentioned locations ? Also, if the template drawing is located in the Common Files\templates\ folder, make sure that file does not have any version extensions .drw.#. Please rename the file and remove the .# extension. Please try this and let me know it works. If this did not solve the issue, please send me your code snippet, template drawing and an example solid model.

View solution in original post

2 REPLIES 2
gquiroga
12-Amethyst
(To:gquiroga)

Got this solution from PTC Support:

The reported error XToolkitNotFound will be received if the specified Template Drawing (not format) “D-CUSTOM.drw” does not exist in any of the below mentioned locations

  1. 1. In the current working directory (OR)
  2. 2. Creo 3.0\MXXX\Common Files\templates\ (OR)
  3. 3. In any directory which is loaded in creo as a search_path (or through Search.pro file)

So, Could you please make sure that the template drawing file “D-CUSTOM” is located in any one of the above mentioned locations ? Also, if the template drawing is located in the Common Files\templates\ folder, make sure that file does not have any version extensions .drw.#. Please rename the file and remove the .# extension. Please try this and let me know it works. If this did not solve the issue, please send me your code snippet, template drawing and an example solid model.

chshasa1
12-Amethyst
(To:gquiroga)

Hi 

 

i have the same problem as mentioned above but your proposal does not work for me.

could there be any other fix?

chshasa1_0-1728054386339.png

i have the "c_drawing" in my default folder and working directory. i tried with and without extension .drw but is not working..

 

Feel the magic
Announcements


Top Tags