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.

J link help

anand_htsl

New member
hi,


i am using Jlink Asynchronous mode and i am using proe wildfire 2.0.


I am getting an exception.


i have listed all my settings and code.


CLASSPATH: .;C:\ptc\text\java\pfcasync.jar;D:\jlink program\jlinktest;%CLASSPATH%;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;.;


PATH: C:\ptc\bin;D:\java\bin;C:\ptc\i486_nt\lib;%LD_LIBRARY_ PATH%;.


PRO_COMM_MSG_EXE : C:\ptc\i486_nt\obj\pro_comm_msg.exe


PRO_DIRECTORY : C:\ptc


import javax.swing.JFrame;
import javax.swing.JOptionPane;
import com.ptc.cipjava.jxthrowable;
import com.ptc.pfc.pfcAsyncConnection.AsyncConnection;
import com.ptc.pfc.pfcAsyncConnection.pfcAsyncConnection;
import com.ptc.pfc.pfcModel.Model;
import com.ptc.pfc.pfcModel.ModelDescriptor ;
import com.ptc.pfc.pfcModel.ModelType;
import com.ptc.pfc.pfcModel.pfcModel;
import com.ptc.pfc.pfcSession.Session;
public class ActiveModel2
{



private static Session cursession;
private static String proe_cmd = "";
public static void main (String [] args)
{



if (args.length != 1)
{
System.out.println("Wrong number of arguments");
System.out.println("Usage: java pfcAsyncjlinkStartTest<proe_command>");
System.exit(1);
}
else
proe_cmd = args[0];
try
{
System.loadLibrary("pfcasyncmt");
System.out.println("library loaded");
System.out.println("now proe is going to run");
AsyncConnection ac = pfcAsyncConnection.AsyncConnection_Start(proe_cmd,null);
cursession = ac.GetSession();
String stdpath = "d:/jlink program/jlinktest";
ModelDescriptor desc;
Model model;
try
{
desc = pfcModel.ModelDescriptor_Create



(ModelType.MDL_PART, "param_gear1.prt.1",null);
System.out.println("cdescription");
desc.SetPath (stdpath);
System.out.println("path set");
model = cursession.RetrieveModel (desc);
System.out.println("retrieved");
model.Display();
}
catch (jxthrowable x)
{
System.out.println ("Error in initializing modeldescriptor"+x);



}





}
catch (jxthrowable x)
{
// TODO: handle exception
System.out.println("Exception: "+x);
}
}



}


when i compile this code it is getting compiled.but when i run this code, i am getting an exception


com.ptc.pfc.Implementation.pfcExceptions$ToolKitGeneralError in the line


AsyncConnection ac = pfcAsyncConnection.AsynConnection_start(proe_cmd,null);





Please help me in this regard.





Anand.c
 
Hi Anand,


Are you working in Honeywell Technology Solutions Lab?


You name Anand_htsl seems to be you might be working in above.Infcat i too working on contract.I have no idea on Jlink,I am more in Pro-Toolkit.


With regards


Kishore V
 

Sponsor

Back
Top