Author Topic: Dialog boxes  (Read 812 times)

0 Members and 1 Guest are viewing this topic.

DanB

  • Bull Frog
  • Posts: 350
Dialog boxes
« on: January 09, 2020, 04:06:34 PM »
Doing some early brainstorming for a custom routine I want to develop. Dialog box will have several columns that the user will enter data. Can a dialog box update as a user provides information?

For example, one row of A B C D data points. A is required, user must provide 2 of the remaining 3 items, i.e. provides B and D, C will can be calculated. I would want C to populate once the other info is provided, possible?

Admittedly I haven't started coding anything but a coworker and I were just going over some thoughts and want to know what limitations I may have. This would be done with LISP, and I think it's DCL? Been long time since I've tried this sort of thing.

BIGAL

  • Bull Frog
  • Posts: 474
  • 30 + years of using Autocad
Re: Dialog boxes
« Reply #1 on: January 10, 2020, 01:26:23 AM »
You can do certain things this is a sub dcl and as you change any item the total is reflected it also has sliders so you can drag answer rather than input.

Have a look at image.



A man who never made a mistake never made anything

snownut2

  • Swamp Rat
  • Posts: 970
  • Bricscad 20 Ultimate
Re: Dialog boxes
« Reply #2 on: January 10, 2020, 02:54:39 AM »
If you write the dialogs within the lisp function and don't use predefined dialogs, you can make it appear that the dialogs are changing as user is entering data.  The dialog can change dramatically to slightly.  Just about everything appearance wise can be based on user input. 

rayakmal

  • Newt
  • Posts: 35
Re: Dialog boxes
« Reply #3 on: January 11, 2020, 07:36:29 AM »
Doing some early brainstorming for a custom routine I want to develop. Dialog box will have several columns that the user will enter data. Can a dialog box update as a user provides information?

For example, one row of A B C D data points. A is required, user must provide 2 of the remaining 3 items, i.e. provides B and D, C will can be calculated. I would want C to populate once the other info is provided, possible?

Admittedly I haven't started coding anything but a coworker and I were just going over some thoughts and want to know what limitations I may have. This would be done with LISP, and I think it's DCL? Been long time since I've tried this sort of thing.

Yes, you can do that. Autolisp + DCL is an event-driven programming, that's why I love to use DCL.

snownut2

  • Swamp Rat
  • Posts: 970
  • Bricscad 20 Ultimate
Re: Dialog boxes
« Reply #4 on: January 11, 2020, 12:20:15 PM »
Take a look at LeeMac's website, he has an example there using autos as an example....

DanB

  • Bull Frog
  • Posts: 350
Re: Dialog boxes
« Reply #5 on: January 13, 2020, 09:45:26 AM »
Thanks all, and yes LeeMac's website is always useful.

Rustabout

  • Newt
  • Posts: 46
Re: Dialog boxes
« Reply #6 on: January 22, 2020, 07:25:33 PM »
I think what you are explaining is 100% possible. For example, if you have 4 edit boxes. And you need 3 of them to have "something" before the 4th one fills in a value.

I *think* you can do this without having to create the dialog in the LISP code itself, unless I've miss-interpreted your coding challenge. Here is a link to Afralisp's "default dialog data" tutorial:

https://www.afralisp.net/dialog-control-language/tutorials/default-data.php

He places a function in his action_tile's argument. That function first verifies if the tiles value has changed, and if it has, he then uses set_tile to change a value in the dialog box.

I've been playing around with similar stuff lately. But I'd have to know exactly what you are doing before I could try and figure out the exact solution.