Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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?
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
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 .
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:
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
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.