Please can someone help me understand what is required to make this work now that control name are some kind of autocad entity. It use to work in odcl.
Thanks, Jim
(defun tcam:SnapCtrlNames ()
(list
TahlCAD_TahlSnapsH_cbEnd
TahlCAD_TahlSnapsH_cbMid
)
)
(mapcar
(function
(lambda (a )
(Dcl_Control_SetValue
a
1
)
(tcam:SnapCtrlNames)
)
)
)
How does your code fail? Do you get an error message?
if I
(list
(quote TahlCAD_TahlSnapsH_cbEnd)
(quote TahlCAD_TahlSnapsH_cbMid)
)
instead of
(list
TahlCAD_TahlSnapsH_cbEnd)
TahlCAD_TahlSnapsH_cbMid)
)
I get the error: ; error: invalid data type or data overflow: TAHLCAD_TAHLSNAPSH_CBEND
otherwise:
I'm not sure if you're referring to the (dcl_Control_SetValue) in your code example or the (dcl_Control_SetEnabled) shown in the screen shot, but yes there where a number of changes from 4.1 to 5.0 that breaks existing code.
"SetEnabled" is expecting a Bool. T\nil & "SetValue" is expecting an integer 0,1,2
Per the Intelligent Help:
(dcl_Control_SetEnabled Untitled_Form1_TextButton1
newValue [as Boolean])
(dcl_Control_SetValue Untitled_Form1_Option1
newValue [as Integer])
Thanks Barry,
That cleared everything up.
Cheers,
Jim :)