Jump to content

where does all the data go when i hide my dialog box and how does it come back


ChrisAllison

Recommended Posts

I have written a progam to make adjustments and add symbols, text to shapes and export data to SQL (ADOLisp nice set of DB connection tools works great) that are cut on a waterjet. when i hide the dialog box to select entities to work on the data is restored. but i made an error in my code and now when the dialog box reappears most of the fields are now empty. can't seem to pick out why it is doing this. ~2800 lines of code. a little knowledge as to how the values are restored would give me an idea where to start.

Link to comment
Share on other sites

The active values & selections of each DCL tile are not stored anywhere - you need to assign the selected values for each DCL tile to local variables, and then restore these values (e.g. using set_tile) when the dialog is displayed.

Link to comment
Share on other sites

Thanks Lee for your reply. That’s what I thought. I justhave to find the right place to put the code.

Would this be right if I did this.

My code( part of.)

Prepare variables, lists for popups, drawing environment andselect entity to work on.

(setq hideflag 4)

Load dialog

While hideflag >1

Not new_dialog exit

loadup the popups

set_tile all field variables

action_tile checking fields, loading buttons

(action_tile "pickedges3" "(done_dialog5)")

start the dialog

(if (= hideflag 5)

(SingleEdgeOffset(atof #pcad_metall-1))

);if

Set some checkboxes (this part needs work I have to click onoff before it will disable a button)

Unload_dialog

Then run other stuff if you clicked OK.

(I am not at my desk)

So do I place the extract and load fields here see below

(if (= hideflag 5)

Get all the fields with get_tile before runningSingleEdgeOffset and making the dialog hide

(SingleEdgeOffset(atof #pcad_metall-1))

Set all the fields with set_tile after running SingleEdgeOffset

);if

Or

Do I add it into the action tile command.???

Link to comment
Share on other sites

I tend to follow a technique of first defining a set of local variables with default selection values (or values sourced from an external file), using such variables to initially populate the various dialog tiles, and then updating the values of such variables within the action_tile statements with the active selections for each tile.

 

I hope this helps,

 

Lee

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