Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

J-link set parameter value : Xtoolkitnotvalid exception


J-link set parameter value : Xtoolkitnotvalid exception


I'm working on a J-Link based plugin for Creo Parametric 4.0, and I have issues setting a value to a part's parameter.

I am able to correctly read the parameter value using this code :
Parameter valuesParam_PTC_MATERIAL_NAME = myModel.GetParam("PTC_MATERIAL_NAME");
String strPTCMaterialName = valuesParam_PTC_MATERIAL_NAME.GetScaledValue().GetStringValue();

But when I try to set a new value with this code :

ParamValue value = pfcModelItem.CreateStringParamValue("MyNewMaterialName");

I'm getting the following exception :

at com.ptc.wfc.Implementation.WFCRemoteCommImpl.makeObject(
at com.ptc.cipjava.NativeTransport.recvObject(
at com.ptc.cipjava.CIPRemoteComm.processMessages(
at com.ptc.wfc.Implementation.pfcModelItem$Parameter.SetScaledValue(
at com.thales.param_rename.UtilParamRename.addParamRename(
at com.thales.param_rename.UtilParamRename.OnCommand(
at com.ptc.wfc.Implementation.WFCRemoteCommImpl.dispatch(
at com.ptc.cipjava.CIPRemoteComm.processMessages(
at com.ptc.wfc.Implementation.WfcStarter.serverLoop(
at com.ptc.wfc.Implementation.WfcStarter.main(

I checked the parameter of the part directly inside Creo Parametric UI, and there is no access restriction on it...

Would anyone have an idea about the possible cause for this issue ?

Thank you very much for your help and time.

I finally found a way to solve my problem.

It appears that PTC_MATERIAL_NAME can't be modified directly, so I had to create a new empty material with the desired name, and to assign it to the part.

Then all works perfectly !

Top Tags