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 access to config.pro set props

jruffsr

New member
I am having no luck in accessing a parameter [pro_material_dir] using jlink. I have tried the following without success

session = pfcGlobal.GetProESession();

Model model = session.GetCurrentModel();

if(model == null)

{

System.out.println("Null model found");

return;

}

String prop_name = "pro_material_dir";

Parameter param = model.GetParam(prop_name);

if(param == null)

{

}

else

{

ParamValue pv = param.GetValue();

String modelDescr = pv.GetStringValue();


JOptionPane.showMessag eDialog (null, "Open window" + modelDescr,"Init
Check", JOptionPane.INFORMATION_MESSAGE );

}



Can someone point me to a better example than what is provided in the Wildfire 2.0 jlink directory?

Thanks

Jeff Ruff
 
After much more searching I found the following solution



try

{

session = pfcGlobal.GetProESession();

String propValue = session.GetConfigOption(prop_name);


//JOptionPane.showMessageDialog (null, "Property value
"+propValue,"Init Check", JOptionPane.INFORMATION_MESSAGE );

}

catch(Exception jx)

{

jx.printStackTrace();

}
 

Sponsor

Articles From 3DCAD World

Back
Top