Jump to content

Recommended Posts

Posted (edited)

Hi all, I have rebuilt the dcl and lsp files for my purposes. Can someone show me how to query the set variable (with wcmatch or cond)?

Thanks in advance.

 

(defun c:MyToggles (/ Dcl_Id% Layout_A1H$ Layout_A2H$ Layout_A3V$ Layout_A3H$ Layout_A4V$ Layout_A4H$ Return#)
  
;----- set default variables
  
  (if (not *MyToggles@) ;unique global variable name to store dialog info
    (setq *MyToggles@ (list nil "0" "0" "0" "0" "0" "0"))
  )
  
  (setq Layout_A1H$ (nth 1 *MyToggles@)
        Layout_A2H$ (nth 2 *MyToggles@)
        Layout_A3V$ (nth 3 *MyToggles@)
        Layout_A3H$ (nth 4 *MyToggles@)
        Layout_A4V$ (nth 5 *MyToggles@)
        Layout_A4H$ (nth 6 *MyToggles@)
  )
  
;----- load dialog dcl data
  
  (setq Dcl_Id% (load_dialog "MyDialogs.dcl"))
  (new_dialog "MyToggles" Dcl_Id%)
  
;----- set dialog initial settings
  
  (set_tile "A1H" Layout_A1H$)
  (set_tile "A2H" Layout_A2H$)
  (set_tile "A3V" Layout_A3V$)
  (set_tile "A3H" Layout_A3H$)
  (set_tile "A4V" Layout_A4V$)
  (set_tile "A4H" Layout_A4H$)
  
;----- dialog actions
  
  (action_tile "A1H" "(setq Layout_A1H$ $value)")
  (action_tile "A2H" "(setq Layout_A2H$ $value)")
  (action_tile "A3V" "(setq Layout_A3V$ $value)")
  (action_tile "A3H" "(setq Layout_A3H$ $value)")
  (action_tile "A4V" "(setq Layout_A4V$ $value)")
  (action_tile "A4H" "(setq Layout_A4H$ $value)")
  
  

  (setq Return# (start_dialog))
  
  
  
;----- Unload Dialog 
  
  (unload_dialog Dcl_Id%)
  

  
  (setq *MyToggles@ (list nil Layout_A1H$ Layout_A2H$ Layout_A3V$ Layout_A3H$ Layout_A4V$ Layout_A4H$))
  (princ)
  
  ;c:MyToggles
  
)

 

MyToggles : dialog {
  key = "Title";
  label = "Layouts"; //title from lsp file
  spacer;
  : boxed_column {
    label = "Get your Layouts:";
    width = 34.26;
    fixed_width = true;

    : toggle {
      key = "A1H";
      label = "A1 - Horizontal";
    }

    : toggle {
      key = "A2H";
      label = "A2 - Horizontal";
    }

    : toggle {
      key = "A3V";
      label = "A3 - Vertikal";
    }

    : toggle {
      key = "A3H";
      label = "A3 - Horizontal";
      value = "1" ;	//predefined selection
    }

    : toggle {
      key = "A4V";
      label = "A4 - Vertikal";
    }

    : toggle {
      key = "A4H";
      label = "A4 - Horizontal";
    }

    spacer;
  }
  spacer;
  ok_only;

}

 

How do I include the variable query here?

 

	(cond ((= Layout_A1H$ 1) "selected")
		('T "not selected") 
 	)
Edited by Manuel_Kunde

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...