Reputation: 47
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
Reputation: 1
For me it was easier to setup an Asynchronous Connection. Following steps are necessary:
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
Setup your CLASSPATH to jar file pfcasync.jar at --> <creo_loadpoint>\Common Files<datecode>\text\java
Append your PATH variable (needed for asynchronous library)
set PATH=<creo_loadpoint>\Common Files
<machineType>\lib;%PATH%
Add the asynchronous library in your java code with
System.loadLibrary (“pfcasyncmt”)
Upvotes: 0
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