Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DCL help. Toggle selection with hide dialog conditional??

4 REPLIES 4
Reply
Message 1 of 5
bhull1985
1072 Views, 4 Replies

DCL help. Toggle selection with hide dialog conditional??

Hey everyone...alright here's the skinny. I'm making a pretty complicated custom application to send block attribute information into excel. In constructing the DCL I'd like to have a toggle for "Select *ALL* blocks" and/or "Pick Blocks" or "Standard Instrument Selection". Two of these would be toggle checkboxes, that I'd like to force the user to only be able to have one selected. I.e. if they choose the toggle for "Select *all* blocks" then it would switch the check mark out of "Pick Blocks" or "Standard Instrument Selection" and every iteration of those. I believe this is common with toggles I just do not know the code for it.

Additionally, if they select "Pick Blocks" i wish to hide the dcl and allow them to complete a ssget. I know the code to hide the dcl as well as the ssget, but what I don't know is how to interact with the other toggles in this catagorey. If they select "pick blocks" which is a button, to be able to hide the dcl, i want it to count as the selection of toggles and therefor remove any "checkmarks" for selected toggles: "Select *ALL* blocks" and/or "Standard instrument selection".

I hope this explination was clear enough but here's a pic of the dcl to help out!

(currently I have just two toggles showing but I believe I want to rename "select blocks" TOGGLE to "Standard Instrument Selection" and do the SSget automatically based on a defun that will correspond to that selection.

So, again....1 of the 3 options for toggles only, not 2 selections. If they press the button hide DCL immediately, if they choose one of the toggles the "Okay" button will need to have different done dialogs? If someone could help me with this I would appreciate it greatly.

dcl2.jpg

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
4 REPLIES 4
Message 2 of 5
bhull1985
in reply to: bhull1985

Alright, I believe I'm going to be setting values for a flag in order to accomplish this?

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 3 of 5
Lee_Mac
in reply to: bhull1985


@bhull1985 wrote:

Two of these would be toggle checkboxes, that I'd like to force the user to only be able to have one selected. I.e. if they choose the toggle for "Select *all* blocks" then it would switch the check mark out of "Pick Blocks" or "Standard Instrument Selection" and every iteration of those. I believe this is common with toggles I just do not know the code for it.


 I would suggest using radio_buttons within a radio_row cluster.

Message 4 of 5
scot-65
in reply to: bhull1985

As Lee Mac suggested - Radio buttons.

 

As long as the radio buttons "Rad101"and "Rad102" are not separated by another control,

you can add a button control inside the boxed radio row [key="Rad100"] without issue.

 

In the mode tile part of your program:

(if (= (get_tile "Rad100") "Rad101") (mode_tile "But102" 1) );if

 

(action_tile "Rad101" "(mode_tile \"But102\" 1)") ;notice the escaped quotes here?

(action_tile "Rad102" "(mode_tile \"But102\" 0)")

(action_tile "accept" "(GET_CURRENT_STATE)(done_dialog 1)")

 

I would suggest using a predefined drop-down for each excel option - this will help limit user input error.

You may even try a slider/edit box combination for the numbered row...

 

You say you can/want to loop the dcl off for selection, then on again?

As a general guide (done_dialog 0) is cancel, 1 = accept, and anything else is looping or nesting.

I start out by setting sd = 2 then enter the while using (> sd 1)

 

(action_tile "But102" "(GET_CURRENT_STATE)(done_dialog 3)")

From there go past the (setq sd (start_dialog)) line to start selecting your objects:

(if (= sd 3) (progn... ))

then, the next line is the closing ");while" part.

 

Again, back in the mode tile part of your program:

(if (= sd 3) (mode_tile "Rad100" 1) );if

will disable the box radio row in it's entirety, in the next loop.

 

Hope this helps...


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 5 of 5
bhull1985
in reply to: scot-65

Excellent!

Thank you so much Scot65 and LeeMac, you two are truly teachers.

I'll be spending today working on this program, rest assured I'll reply in this thread when another issue arises or upon completion.

Thanks again! Kudos to both.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost