Dialog box - Toggle

Dialog box - Toggle

Henrik_Lo
Collaborator Collaborator
1,211 Views
6 Replies
Message 1 of 7

Dialog box - Toggle

Henrik_Lo
Collaborator
Collaborator

Hi

I need some help to get an toggle to work, I newer used this action before, and cannot get it to work.
I can read that I need to keep track on my input, but is not working for me.

Fx. The DCL toggle

   : toggle {
   key = "tg1"; value = 1;
   label = "PDF creator ";
   }


How dos the lisp expression look like do following.

 

A default value need to do an action, and if I check it out, the action need to be stopped.
could be something like this, just for an example.

   (if (= tg1 “1”)
      (Setq aa “Yes”)
      (Setq aa “No”)
   )

Regards
Henrik

0 Likes
Accepted solutions (1)
1,212 Views
6 Replies
Replies (6)
Message 2 of 7

hak_vz
Advisor
Advisor

For a start look here at Afralisp.

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 3 of 7

dlanorh
Advisor
Advisor

Get the value of the tile before testing using an action_tile in the lisp. action_tile

(action_tile "tg1" "(setq tg1 $value)")
(if (= tg1 "1")
  (setq aa “Yes”)
  (Setq aa “No”)
)

 

I am not one of the robots you're looking for

0 Likes
Message 4 of 7

Henrik_Lo
Collaborator
Collaborator

Hi

I know this normal action_tile, I did tray this way, but I couldn’t get is to work, only the first statement is working, I don’t think there will be another value when check it out , only 1 is exciting. I think there need more.

 

Regards

Henrik

0 Likes
Message 5 of 7

Henrik_Lo
Collaborator
Collaborator
Accepted solution

Hi

If found out that I added a value in the DLC file, and it is important not to do that, then i followed AfraLISP regarding toggle dialog, and then It worked.

Thangs for helping out.

 

Regards

Henrik

Message 6 of 7

Sea-Haven
Mentor
Mentor

This may come in handy go to Cadtutor, Downloads and look at "Multi toggles.lsp" it is a library routine can have as many toggles as you need from 1 to screen size limit.

0 Likes
Message 7 of 7

Henrik_Lo
Collaborator
Collaborator

Hi

Thangs for advice

Regards

Henrik

0 Likes