Jim
2008-07-29 14:36 UTC
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)
)
)
)
owenwengerd
2008-07-29 14:53 UTC
How does your code fail? Do you get an error message?
Jim
2008-07-29 15:36 UTC
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:
bazzacad
2008-07-29 20:37 UTC
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])
Jim
2008-07-30 01:14 UTC
Thanks Barry,
That cleared everything up.
Cheers,
Jim :)