slimpickinz 发表于 2022-7-6 12:24:08

acet-help not loading from Lis

When I strip out all my dialog, and just keep the 3 tiles OK Cancel & Help, the .chm I have created opens when I click the Help button.
But when I add the code to the full routine, the dialog loads properly, the routine runs, OK & Cancel work, but the Help button does nothing.
All the files are in a set path, I am stumped here.
Please take a look at the code and see if you see something I am missing here.
The Lisp is a bit rough right now I realize, but I will improve on the functionality after I get this fixed.
>
 
Thanks
SlimP
 

//DCL CODING STARTS HEREpid4 : dialog {label = "PID v1.0" ;: spacer {height          = 1 ;}: boxed_column {: row {: boxed_column {label = "SUCTION GROUPS";fixed_width = true;fixed_height = true;fixed_width_font = true;: popup_list {key = "suctgrps";value = "0" ;edit_width = 20;}}//: spacer {//width          = 3 ;//}//: spacer {//height          = 1 ;//}//Subcooler Options: row {: boxed_column {label = "SUBCOOLING";fixed_width = true;fixed_height = true;fixed_width_font = true;: popup_list {key = "subcool";value = "0" ;edit_width = 20;}}: spacer {width          = 3 ;}// Liquid Injection Option Yes or No: row {: boxed_column {label = "LIQ. INJECTION (LT)";fixed_width = true;fixed_height = true;fixed_width_font = true;: popup_list {key = "liqinj";value = "0" ;edit_width = 20;}} } } } }: spacer {width          = 30 ;}//BEGIN COMPRESSOR SELECTION: boxed_column {label = "COMPRESSORS";: row {: column {fixed_width = true;fixed_height = true;fixed_width_font = true;: row {: boxed_column {label = "COMPRESSOR 1";: popup_list {key = "comp1un";value = "0" ;edit_width = 10;}: popup_list {key = "comp1vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comp1dig";value = "0" ;edit_width = 10;}: popup_list {key = "comp1hfan";value = "0" ;edit_width = 11;}}: boxed_column {label = "COMPRESSOR 2";: popup_list {key = "comp2un";value = "0" ;edit_width = 10;}: popup_list {key = "comp2vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comp2dig";value = "0" ;edit_width = 10;}: popup_list {key = "comp2hfan";value = "0" ;edit_width = 11;}}: boxed_column {label = "COMPRESSOR 3";: popup_list {key = "comp3un";value = "0" ;edit_width = 10;}: popup_list {key = "comp3vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comp3dig";value = "0" ;edit_width = 10;}: popup_list {key = "comp3hfan";value = "0" ;edit_width = 11;}}: boxed_column {label = "COMPRESSOR 4";: popup_list {key = "comp4un";value = "0" ;edit_width = 10;}: popup_list {key = "comp4vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comp4dig";value = "0" ;edit_width = 10;}: popup_list {key = "comp4hfan";value = "0" ;edit_width = 11;}}: boxed_column {label = "COMPRESSOR 5";: popup_list {key = "comp5un";value = "0" ;edit_width = 10;}: popup_list {key = "comp5vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comp5dig";value = "0" ;edit_width = 10;}: popup_list {key = "comp5hfan";value = "0" ;edit_width = 11;}} }: row { : boxed_column {label = "COMPRESSOR S1";: popup_list {key = "comps1un";value = "0" ;edit_width = 10;}: popup_list {key = "comps1vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comps1dig";value = "0" ;edit_width = 10;}: popup_list {key = "comps1hfan";value = "0" ;edit_width = 11;}}: boxed_column {label = "COMPRESSOR S2";: popup_list {key = "comps2un";value = "0" ;edit_width = 10;}: popup_list {key = "comps2vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comps2dig";value = "0" ;edit_width = 10;}: popup_list {key = "comps2hfan";value = "0" ;edit_width = 11;}}: boxed_column {label = "COMPRESSOR S3";: popup_list {key = "comps3un";value = "0" ;edit_width = 10;}: popup_list {key = "comps3vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comps3dig";value = "0" ;edit_width = 10;}: popup_list {key = "comps3hfan";value = "0" ;edit_width = 11;}}: boxed_column {label = "COMPRESSOR S4";: popup_list {key = "comps4un";value = "0" ;edit_width = 10;}: popup_list {key = "comps4vfd";value = "0" ;edit_width = 10;}: popup_list {key = "comps4dig";value = "0" ;edit_width = 10;}: popup_list {key = "comps4hfan";value = "0" ;edit_width = 11;}} }}   }    }//}//BEGIN LOOP SELECTION: boxed_column {label = "LOOP CIRCUITS";: row { : boxed_column {label = "LOOP 1";: popup_list {key = "loop1";value = "0" ;edit_width = 15;}}: boxed_column {label = "LOOP 2";: popup_list {key = "loop2";value = "0" ;edit_width = 15;}}: boxed_column {label = "LOOP 3";: popup_list {key = "loop3";value = "0" ;edit_width = 15;}}: boxed_column {label = "LOOP 4 (SC)";: popup_list {key = "loop4";value = "0" ;edit_width = 15;}} } : row { : boxed_column {label = "LOOP S1";: popup_list {key = "loops1";value = "0" ;edit_width = 15;}}: boxed_column {label = "LOOP S2";: popup_list {key = "loops2";value = "0" ;edit_width = 15;}}: boxed_column {label = "LOOP S3";: popup_list {key = "loops3";value = "0" ;edit_width = 15;}}: boxed_column {label = "LOOP S4 (SC)";: popup_list {key = "loops4";value = "0" ;edit_width = 15;}} }}//   //CONDENSER OPTIONS//: boxed_column {fixed_width = true;label = "CONDENSER" ;: boxed_column {label = "Condenser Location";: popup_list {key = "cond1";value = "0" ;edit_width = 25;}}: boxed_column {label = "Water Heat Reclaim";: popup_list {key = "whr";value = "0" ;edit_width = 25;}}//: boxed_column {//fixed_width = true;//label = "RECEIVER" ;: boxed_column {label = "Receiver Size";: popup_list {key = "rec1";value = "0" ;edit_width = 15;}} } ////////////////// BUTTONS /////////////////////: row {   spacer;   spacer;   spacer;   spacer;   : button {   fixed_width=true;   width=13;   key="accept";   is_default=true;   label= "OK";   }   : button {   fixed_width=true;   width=13;   is_cancel=true;   key="cancel";   label= "Cancel";   }   : button {   fixed_width=true;   width=13;   key="help";   label= "&Help";   is_help=true;   }}//ok_cancel_help ;}//DCL CODING ENDS HERE
pid903.LSP
acet.zip

The Buzzard 发表于 2022-7-6 12:30:05

It appears you are calling for a function called acet-help.
 

         (action_tile "help" "(acet-help)")
 
I did not find a function by this name in your program.
Also I think you cannot use "help" as a key as it is reserved for acad help function. (not exactly sure)

gile 发表于 2022-7-6 12:30:41

Hi,
 
Try
 

(action_tile "help" "(help \"acet\")")

The Buzzard 发表于 2022-7-6 12:33:59

 
gile,
 
That work great except the acet.chm needed to be renamed to acet-help.chm, Otherwise it opens express tools help file.
 
I added the change with the renamed help file in the attached zip file.
 

(action_tile "help" "(help \"acet-help\")")
 
Also the action tile needed to be placed here and not at the end of the program. See below.
 

;;;          /////////////////////   Endof List Box BuildSection      \\\\\\\\\\\\\\\\\\\\\\\\\ ;(action_tile"help""(help \"acet-help\")")(action_tile"accept""(get_data) (done_dialog) (setq userclick T)");action tile(action_tile"cancel";if cancel button pressed"(done_dialog) (setq userclick nil)";close dialog);action_tile(start_dialog);start dialog(unload_dialog dcl_id);;;          /////////////////////   Endof List Box BuildSection      \\\\\\\\\\\\\\\\\\\\\\\\\ ;; **************************************************************************************
 
 
 
 
 
 
Nice fix
pid4.zip

slimpickinz 发表于 2022-7-6 12:39:31

Perfect!
I swear I tried that way (sort of)...
After a while it all starts to run together.
I need to learn patience when dealing with this lisp stuff.
 
One other thing maybe one of you could help me with...
Once I run the program, and I see that I missed answering one of the questions correctly,
I would like the program to "remember" the previous selections so I do not have to answer ALL the questions again, only the one I want to change/revise.
That would be a big plus for this.
 
I also realize I should put in an error trap.
Which type do you prefer?

The Buzzard 发表于 2022-7-6 12:41:42

 
slimpickinz,
 
Attached is a program with two popup lists that will remember the last selection. Just go to the Main Function in this program to see how this is done. I think you will be able to figure this one out. Pay close attention to all the action tiles including the accept or OK button. Everything you need to do this is in there.
This is just a simple generic program that has no other use but to serve as a dialog sample. It does function well for its intended purpose.
 
As far as the error trap is concerned, Get thru this part first and we will worry about error trapping later.
 
Good Luck,
The Buzzard
SL.zip

The Buzzard 发表于 2022-7-6 12:45:49

On second thought the above posted program, I just realized that I did not declare local variables. This may not be as good an example as I originally thought. It may complicate things for you. You cannot declare local variables for the action tiles as they will not remember there last settings because they lose there values after the program completes. They would need to be made as an obscure variable which is not declared and pass their values to another variable to be used in the program, Then those variables can be declared local.
 
You can still use the above program, But you will need to keep this in mind when setting your variables up to remember there last settings.
 
I will see if can come up with a better example or if someone else can post a better explanation. I hope you understand what I have just explained. If you get stuck I will try to get you past it. I did not want you to get too far ahead of yourself just to find this out.
 
Sorry about that slimpickinz,
I did not mean to complicate this more for you.

slimpickinz 发表于 2022-7-6 12:46:29

...after looking through your example, it did seem to confuse me some.
Actually there are alot of variables to redefine in my program.
I think this would make the code way too long...agree?
 
I will wait and see what comes up.
I appreciate your help!
 
I am off to work on my .chm file now, which is much more enjoyable for me.

The Buzzard 发表于 2022-7-6 12:49:50

 
OK, I shortened the program to give you only what you need to see and fixed the variable problem. I hope this helps. Do not give up!
Yes you have alot of variables, So what! You are writting an interesting application. The effort you put into it now will return big rewards.
Because the program you are trying to create seems to be a tall order for you is a good reason to see this thru. Complete what you start!
 
You will not gain the knowledge by giving up on this. Yes, programming is difficult. The whole reason we do this is to make our jobs better to deal with in the first place. I am very impressed with what you have put together so far.
 
Please review what I have now posted. Get started and finish.
There is alot of help here for you in your corner.
 
Good Luck
SYMB.zip

slimpickinz 发表于 2022-7-6 12:54:00

I am a persistent sort, and appreciate the encouragement.
Since you are helping so much I am attaching all the project files
including the drawing that goes with the app, just to show you what I have got so far.
If you would like to suggest any thing you think would help please feel free.
I really enjoy learning like this, and the end result will be a big help.
Again, I really appreciate the assistance.
I really hope that someone else will gain some knowledge from this thread.
 
I will look at your file and see what I can do. At this point I feel very confidant,
& if I cannot figure out a portion of it, I will get back with you.
I am looking forward to sharing the final result with all as well.
pid4.zip
PID-DWG.zip
页: [1] 2
查看完整版本: acet-help not loading from Lis