OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: jmaeding on April 17, 2014, 01:19:13 PM

Title: vl-doc-ref and control name as string
Post by: jmaeding on April 17, 2014, 01:19:13 PM
I do this:
(dcl_Control_SetCaption (vl-doc-ref 'GISData_frmGISData_lblPage) "abc")
I want to do this:
(dcl_Control_SetCaption (vl-doc-ref (QUOTE (READ "GISData_frmGISData_lblPage"))) "abc")

but it does not work.
Is there a way to use a string to access a control when using sep namespace format of vl-doc-ref?
Title: Re: vl-doc-ref and control name as string
Post by: jmaeding on April 17, 2014, 01:24:52 PM
just got it, use:
(dcl_Control_SetCaption (vl-doc-ref (READ "GISData_frmGISData_lblPage")) "ABC")
instead.
No need for quote function.

Owen mentioned a while back that the two string method of accessing controls is less efficient.
So making a string and calling with read is the trick if you need to make control names programmatically, and for separate namespace.