ChrisAllison Posted June 16, 2015 Share Posted June 16, 2015 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. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 16, 2015 Share Posted June 16, 2015 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. Quote Link to comment Share on other sites More sharing options...
ChrisAllison Posted June 16, 2015 Author Share Posted June 16, 2015 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.??? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 16, 2015 Share Posted June 16, 2015 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.