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

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

SOLVED
Highlighted
Participant

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

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.

1 REPLY 1

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

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.