Jump to content

DCL - starting a different function based on radio selection error.


yonderbob

Recommended Posts

Hello all.

 

I have this problem with a DCL.

The dialog opens and i can select the options i want.

But when i press OK nothing happens. I have tried numerous options and code placement but keep getting error to few or to many arguments.

What i want the dialog to do is as followed:

I want it to open and have 2 radio options available wich it does.

Then i want it to run a different function bases on the selection the user makes.

That's about it.

If any of you could look at my code and help me that would be great.

 

Here is my code:

 

(defun C:TheCleaner();define function

 (setq dcl_id (load_dialog "TheCleaner.dcl"));load dialog

 (if (not (new_dialog "TheCleaner" dcl_id);test for dialog

     );not

   (exit);exit if no dialog

 );if

 (setq w (dimx_tile "im");get image tile width
       h (dimy_tile "im");get image tile height

);setq

 (start_image "im");start the image
 (fill_image 0 0 w h 5);fill it with blue
 (end_image);end image

 (action_tile "rb1" "(progn (TheCleaner1)");!!! trying to load the function.
 (action_tile "rb2" "");!!!!Reserverd
   (action_tile
   "cancel";if cancel button pressed
   "(done_dialog) (setq userclick nil)";close dialog, set flag
   );action_tile

 (action_tile
   "accept";if O.K. pressed

   "(done_dialog)(setq userclick1 T))";close dialog, set flag
 );action tile

 (start_dialog);start dialog

 (unload_dialog dcl_id);unload

(princ)

);end defun

(princ)

 

Thanks in advance.

 

bob

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...