OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Jim Short on November 24, 2008, 07:26:38 AM

Title: Dictionary write succeeds with dcl_SendString
Post by: Jim Short on November 24, 2008, 07:26:38 AM
With Owen's help I am now successfully running code with the entmakex function from a check box event.

Questions remaining:

Can dcl_SendString work with just one line? I had to use  (dcl_SendString "\n")   
to get the function to enter on the command line.
Can one construct a command string with arguments eliminating the need for a global variable?

(defun c:Onset_Outline_InfoChkBox_OnClicked (Value)
  ;;returns 1 for true 0 for false
  (setq tcam:*InfoChkBox* value)
  (dcl_SendString "(tcam:infoChkBox)")
  (dcl_SendString "\n")   
  )

(defun tcam:infoChkBox ()
  (tcam:putdictx
    "tcam[Setup]"
    "SETUP{INFO"
    (cons "InfoChkBox" tcam:*InfoChkBox*)
  )
)
Title: Re: Dictionary write succeeds with dcl_SendString
Post by: Fred Tomke on November 24, 2008, 10:46:23 AM
Hi,

try a

(dcl_SendString "(tcam:infoChkBox) ")
or a
(dcl_SendString "(tcam:infoChkBox)\n").

If you want a command with an argument use
(defun c:dosomething (strCtrl intType isReadFromForm) blah...) and call later
(dcl_SendString "(c:dosomething \"MyName\" 4096 T) ")

Fred
Title: Re: Dictionary write succeeds with dcl_SendString
Post by: Jim Short on November 24, 2008, 12:38:12 PM
Gee, I thought I tried that. I give it another go.

Thanks,
Jim
Title: Re: Dictionary write succeeds with dcl_SendString
Post by: Jim Short on November 24, 2008, 12:39:54 PM
I forgot about the space from menu days.

Thanks,
Jim