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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Accessing Locked Parameters with VB API

cabel
1-Newbie

Accessing Locked Parameters with VB API

All,


I am working on a Visual Basic program which simply opens a part and updates the parameters based on values stored in an external file. This works great using Web.Link, but when performing the same operations on the same partusing the VB API, I get the error "pfcExceptions::XToolkitCantAccess." I have found that this error occurs when I am trying to access a parameter that is locked. How can the values of these parameters be updated despite being locked? Below is the code I am using to update the parameter value.



Dim param As IpfcParameter = Nothing


Dim prmVal As IpfcParamValue = Nothing


param = model.GetParam(parameterName)


prmVal = (New CMpfcModelItem).CreateDoubleParamValue(parameterValue)


CType(param, IpfcBaseParameter).Value = prmVal



Thanks for your help,


Cory


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
0 REPLIES 0
Top Tags