pcb_set_form_value()
Sets the value of a parameter that is a constant form. This function must be called within a PARM_MODIFIED_CB callback function created by dm_create_cb(). Returns data which must be returned by the PARM_MODIFIED_CB callback function.
See also: pcb_get_mks(), pcb_set_mks(), pcb_get_form_value(), pcb_get_string(), pcb_set_string().
Syntax:
pcb_set_form_value(paramData, paramName, value)
where
paramData is parameter data. NULL the first time. In addition to this variable being a parameter to this function, the value returned by this function must also be assigned to it.
paramName is the name of the parameter to set the value of.
value is the new value in MKS units.
Example:
create_constant_form("first","first",0,"0","first"); create_constant_form("second","second",0,"1","second"); create_form_set("MyFormSet","first","second"); create_item(... create_parm("A", "A parameter value", NULL, "MyFormSet", UNITLESS_UNIT, prm("first", ""), list(dm_create_cb(PARM_MODIFIED_CB, "a_modified_cb", NULL, TRUE))), create_parm("B", "B parameter value", NULL, "MyFormSet", UNITLESS_UNIT, prm("second", ""))); defun a_modified_cb(cbP, clientData, callData) { decl a_formValue=pcb_get_form_value(callData, "A"); decl b_formValue; if (strcmp(a_formValue, "first")==0) b_formValue="second"; else b_formValue="first"; return(pcb_set_form_value(NULL, "B", b_formValue)); }
Where Used:
Schematic
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()