Moni
Moni

Reputation: 47

Debugging a JLink application in Creo 2.0

I am trying to use J-Link, the Java language toolkit for Pro-Engineer. I get some knowledge from the API that provided by PTC.I need some tutorial or help file for model check.Please guide me to make better.

Any other suggestions/recommendations?

Upvotes: 0

Views: 936

Answers (2)

rk84
rk84

Reputation: 1

For me it was easier to setup an Asynchronous Connection. Following steps are necessary:

  1. create the environment variable PRO_COMM_MSG_EXE to the full path of the executable pro_comm_msg.exe located in --> <creo_loadpoint>\Common Files
    <machineType>\obj\pro_comm_msg.exe

  2. Setup your CLASSPATH to jar file pfcasync.jar at --> <creo_loadpoint>\Common Files<datecode>\text\java

  3. Append your PATH variable (needed for asynchronous library)

    set PATH=<creo_loadpoint>\Common Files
    <machineType>\lib;%PATH%

  4. Add the asynchronous library in your java code with System.loadLibrary (“pfcasyncmt”)

Upvotes: 0

Tommy Bijnens
Tommy Bijnens

Reputation: 1

Have you checked the user guide in the ProE installation folder (\Common Files\jlinkug.pdf)?

Demo applications are in the "jlink_tutorial" and "jlink_appls" folder

Model model = curSession.GetCurrentModel();
ModelCheckInstructions checkInstr = pfcModelCheck.ModelCheckInstructions_Create();
checkInstr.SetMode(ModelCheckMode.MODELCHECK_NO_GRAPHICS);
checkInstr.SetShowInBrowser(true);
checkInstr.SetConfigDir(null);
checkInstr.SetOutputDir(null);
ModelCheckResults modelCheckResults = curSession.ExecuteModelCheck(model, checkInstr);
int numberOfErrors = modelCheckResults.GetNumberOfErrors();
int numberOfWarnings = modelCheckResults.GetNumberOfWarnings(); 

Upvotes: 0

Related Questions