Looking for answers in connecting to a Creo Session using Excel VBA
Hi. I've been battling this issue for quite a while now, and I can't sesem to find adequate answers to help me with this. (I've spent hours browsing through documents and on the net.) I seem to be stuck at one point in my code, (in vba excel) regardless of the example code that I've used and it is with the
CCpfcAsyncConnection.Connect() method. For one thing, I don't understand the arguments that are required. (I'm unable to find any explanation as to what the correct values should be for the arguments; Display, UserID, TextPath, TimeoutSec. Most of the examples I have seen use a null value, e.g
Set cAC = New CCpfcAsyncConnection
Set asyncConnection = cAC.Connect(dbnull, dbnull, dbnull, dbnull) or the dbnull is replaced with "DBnull.value."
In any event, this is where I'm stopped in my efforts to connect to a current Pro/E session. The error msg is always the same - "pfcExcpetions::XToolkitCantModify." I only have a single session open with a single part, and I have no other threads tied to it (as far as I know). I have set the PFCLS_START_DIR environment variable to \x86e_win64\obj\ ,and I have set the PRO_COMM_MSG_EXE environment variable to \x86e_win64\obj\. I also have the PRO_DIRECTORY environment variable set to C:\%\Creo 2.0\. (I don't know that this variable shouldn't be set to the xtop.exe directory.) And I have executed the vb_api_register batch file as administrator. (I have even run the batch file from the command window after removing the
Signed,
Perpetually Frustrated.
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
