Hello Dave,
I was wondering if you could help me with this. I found a older thread on how to make a form by Venkata and I was not able to get the buttons to work. I would like the OK button (Button 1) to run the code we worked on for setting the constraints of bottom SMT to TH to be 50 mils and NO button (button 2) to just close the form. Please see below for the skill file content.
/*Created by xml2bnf perl utility
Coded by Venkata Ramanan/Sant Clara, CA
Version History*/
; WARRANTY:
; NONE. NONE. NONE.
(defun test ()
CreateForm()
myform=axlFormCreate( (gensym) form_file nil 'Form_Action t)
axlFormDisplay(myform)
axlUIWPrint(myform date)
)
(defun CreateForm ()
drain()
form_file = "test_form.form"
myform = outfile(form_file "w")
fprintf(myform "#Created by xml2bnf perl utility\n")
fprintf(myform "#Coded by Venkata Ramanan/Santa Clara, CA\n\n")
fprintf(myform "FILE_TYPE=FORM_DEFN VERSION=2\n")
fprintf(myform "FORM AUTOGREYTEXT\n")
fprintf(myform "FIXED\n")
fprintf(myform "PORT 45 23\n")
fprintf(myform "HEADER \"Form Field Type Demo\"\n\n")
fprintf(myform "POPUP <ENUM>\"ITEM1\"\"0\",\"ITEM2\"\"1\",\"ITEM3\"\"2\",\"LAST ONE\"\"3\".\n\n")
fprintf(myform "TILE\n\n")
fprintf(myform "## Button Field in FORM ## \n")
fprintf(myform "FIELD Button1\n")
fprintf(myform "FLOC 8 13\n")
fprintf(myform "MENUBUTTON \"OK\" 11 3\n")
fprintf(myform "FGROUP \"TH to SMT Bottom Constraints\"\n")
fprintf(myform "ENDFIELD \n\n")
fprintf(myform "## Button Field in FORM ## \n")
fprintf(myform "FIELD Button2\n")
fprintf(myform "FLOC 24 13\n")
fprintf(myform "MENUBUTTON \"NO\" 11 3\n")
fprintf(myform "FGROUP \"TH to SMT Bottom Constraints\"\n")
fprintf(myform "ENDFIELD \n\n")
fprintf(myform "## Text Field in Form## \n")
fprintf(myform "TEXT \"Change TH to SMT Bottom Constraints to 0.050?\"\n")
fprintf(myform "FLOC 5 5\n")
fprintf(myform "TGROUP \"TH to SMT Bottom Constraints\"\n")
fprintf(myform "ENDTEXT\n\n")
fprintf(myform "ENDTILE\n\n")
fprintf(myform "ENDFORM\n\n")
close(myform)
)
(defun Form_Action (myform)
(let (t1 item index field cnt)(printf "field/value %L = %L (int %L\n)"
myform->curField myform->curValue, myform->curValueInt )
(printf "doneState %L\n" myform->doneState )
case(myform->curField
("Button1"
;Button Field
;Enter Action Here
)
("Button2"
;Button Field
;Enter Action Here
)
)
)
if((nequal myform->doneState 0)
axlFormClose(myform))
)
It says button field
;Enter action here so I'm assuming this is where I put the code in.
I tried
defun( TH_SMT (t_open) axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))) and axlCNSSetSpacing(nil "ETCH/BOTTOM" 'thrupin_smdpin axlMKSConvert(50 "mils"))), but neither worked.
Please let me know if you are able to help.