Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Dynamic reference in VB6 to proe API

ezaidi

New member
Hi, I am currently in the process of developing some automation in ProE Wf4. At the moment I have created something in VBA with excel where my macro will read a range from excel and plug values into my proe assembly with parameters having the same name as the ones in excel. This works perfectly so far. I have tried accross different platforms and it seems to work as well. The only quirk is that whenever I copy my excel document containing the macro to another PC, I need to re-reference the "Pro/E VB API Type library for ProE/ Wildfire 4.0"; in other words I have to re-reference the pfclscomm.exe file.

This is quick and easy to do in VBA for excel however what we want to do is now take this further and compile this code as part of a ActiveX DLL addin in excel and host this dll on the server so that everyone can use it. So far we have had much success using these activeX automation DLL's on our server and would like to do the same with ProE.

My problem is the referencing to the pfclscomm.exe which can only be finalized at compile time. Because the Path on my machine is "C:\PTC\ProeWildFire4\i486_nt\obj\pfclscomm.exe", this path may be different on other machines or they are using a 64 bit version of proe then the pfclscomm is different.

My question: is there a way to dynamically create the reference to the correct location of pfclscomm.exe in VB6 so that our DLL can be used on different platforms without having the issue of unresolved references?

I would appreciate it if someone had any insight or better ways of accomplishing this task.

Thank you very much in advance.
 

Sponsor

Articles From 3DCAD World

Back
Top