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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

pfcExeptions::XToolkitObsoleteFunc in VBA API with Creo 10

SKerski
4-Participant

pfcExeptions::XToolkitObsoleteFunc in VBA API with Creo 10

Hey guys,

 

Im currently testing a VBA Code from a college, that was written for Creo 4. In one part, it uses the method IpfcParameter.GetDriverType(). It worked fine in Creo 4, but now with Creo 10, it gives the Runtime Error '-2147352567 (80020009)': pfcExeptions::XToolkitObsoleteFunc.

 

The method is still present in the VB API User’s Guide 10.0.0.0, so I dont know why it should be obsolete. Is there a workaround to get the value otherwise?

6 REPLIES 6
VladimirN
24-Ruby II
(To:SKerski)

Take a look solution here - "XToolkitObsoleteFunc with C++ otk in Creo 9.0.0.0 for pfcComponentFeat::GetModelDescr()": https://community.ptc.com/t5/Customization/XToolkitObsoleteFunc-with-C-otk-in-Creo-9-0-0-0-for/td-p/816166 

SKerski
4-Participant
(To:VladimirN)

Thanks for the hint Vladimir. Does "get the Creo 9.0 sources" mean, selecting the new library in the references list? If so, can you tell me the path of the library? It isnt showing in the list.

VBA Code needs the Creo VB API Type Lybrary referenced. Try adding/updating to the current <Creo Installation Directory>\Common Files\x86e_win64\obj\pfclscom.exe .

SKerski
4-Participant
(To:HannesBuxbaum)

Thanks for the info. When I try to add the pfclscom.exe, the list of libraries refreshed once, but the Creo library isnt showing. Did I miss a step?

Should look like this:

HannesBuxbaum_0-1732291113884.png

1. (left side): pick the EXE (set filter to show EXE files)
2.(right side): the "Creo VB API" entry should appear. (If not: try to remove an existing entry, that might be unchecked)

3. Still not showing up? try these steps on a fresh Windows installation and/or new/clean Windows user profile

SKerski
4-Participant
(To:HannesBuxbaum)

Hello Hannes,

 

I guess the error comes from the fact, that there already is a (unchecked) pfclscom.exe in the list for the existing Creo 4 installation. I cant fully remove it with the commands  "Application.VBE.ActiveVBProject.References.Remove" or "ActiveWorkbook.VBProject.References.Remove", because they only uncheck the given reference. Do you know another way to remove it from the list? Otherwise I will try to message our IT admin.

 

 

Announcements


Top Tags