乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: slimpickinz

[编程交流] acet-help not loading from Lis

[复制链接]

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 12:57:10 | 显示全部楼层
 
Thats the spirit! Just take it one variable at a time. It will be done before you know it. I will look over what you have posted and get back to you with any suggestions that may be helpful.
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 13:00:49 | 显示全部楼层
I noticed you have [select One...] [unloaded?] etc, etc.
You do not need to do this. Just have the program default to the first ones in the lists that will have the program perform correctly. Otherwise, you will need to provide error trapping for all these questions which is overkill. It seems you have the defaults in place already.
 
When the user selects the OK button without changing anything in the lists, The program will perform without the need for error trapping in this case. It will be upto the user to change the selections as deemed fit.
 
This will save alot of useless extra programming for starters.
回复

使用道具 举报

3

主题

20

帖子

17

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-6 13:04:28 | 显示全部楼层
I am afraid I have started with such a convoluted method, I am going to have to re-do this thing just to make sense of your few lines....
 
 
See if I am catching on here...
 
  1. (start_list "pl1") (mapcar 'add_list ds_list) (end_list) (setq SYM  "Triangle") (if SYM:DEF (set_tile "pl1" (itoa SYM:DEF)))
where "pl1" is my popup_list key
and this line
  1.   (setq SYM  "Triangle")
sets the list default value when starting the program?
 
Then this...
  1.   (action_tile "accept"   (strcat    "(progn     (setq S:YM (atoi (get_tile "pl1")) SYM:DEF S:YM)"
sets the list so it can recall the previous selection?
 
 
.
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 13:06:55 | 显示全部楼层
 
 
You got it!
Just remember the variables used that are obscure look like this: S:YM, D:SF and are not declared, Because if you declare them their values would be lost upon program completion and they would not remember their last value.
 
You can also see the transition to another variable that can be declared.
 
Example:
  1.   (cond   ((= S:YM 0)(setq SYM "Triangle"))   ((= S:YM 1)(setq SYM "Square"))   ((= S:YM 2)(setq SYM "Circle")) ) (cond   ((= D:SF 0) (setq DSF  "1/32" = 1'"))   ((= D:SF 1) (setq DSF  "1/16" = 1'"))   ((= D:SF 2) (setq DSF  "3/32" = 1'"))   ((= D:SF 3) (setq DSF  "1/8" = 1'"))   ((= D:SF 4) (setq DSF  "3/16" = 1'"))   ((= D:SF 5) (setq DSF  "1/4" = 1'"))   ((= D:SF 6) (setq DSF  "3/8" = 1'"))   ((= D:SF 7) (setq DSF  "1/2" = 1'"))   ((= D:SF  (setq DSF  "3/4" = 1'"))   ((= D:SF 9) (setq DSF  "1" = 1'"))   ((= D:SF 10)(setq DSF  "1-1/2" = 1'")) )
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 13:10:15 | 显示全部楼层
Please understand, Yes you have alot of variables. But!, You have a program that is doing an awful lot of work in one shot. Try doing this work without a program. What you are trying to accomplish is wonderful. So pursue your goal. Take it one variable at a time. Do not get overwhelmed with the size of the project.
回复

使用道具 举报

3

主题

20

帖子

17

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-6 13:13:12 | 显示全部楼层
The reason I did all those Select One... is that there may not be a component related to that group. That way if there are only 3 compressors then you do not touch comp4 or 5, it will not display those units. What I want to do is have a radio button for each unit, "yes or no"...
The if yes, all other selections are made available, if no, it turns them "off" and possibly "greys out" or disables the selection.
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 13:17:09 | 显示全部楼层
 
There is another way to accomplish this, But is abit more involved. I would have to write you another example on how to do this. What you would need to do is extract only certain info from your list based on certain criteria.
 
I believe there are other threads by ASMI and Lee Mac on this subject to extract list items.
 
View this thread and the program and watch what happens to the lists when certain radio buttons are selected.
http://www.cadtutor.net/forum/showthread.php?t=34891
回复

使用道具 举报

3

主题

20

帖子

17

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-6 13:19:05 | 显示全部楼层
I am also using a lazy button, to reset all layers and restart the app upon error or redo.
Kinda sloppy, but it works.
 
I will work on your recall method.
Thanks a TON.
I am also going to start commenting off to the side as you do.
Much easier to follow.
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 2022-7-6 13:24:06 | 显示全部楼层
 
Did you run the program from the thread I pointed out to you?
Did you notice what happened to the lists?
 
I think this is what you may be after.
I believe you have the smarts to tackle this.
It is upto to you to decide whats best for your program.
I am just giving you a push in a certain direction.
回复

使用道具 举报

3

主题

20

帖子

17

银币

初来乍到

Rank: 1

铜币
15
发表于 2022-7-6 13:27:07 | 显示全部楼层
yes I did run it and noticed that depending on the selection (interior door, cabinet door etc), the list choices change. Interesting.
 
What ya think about this?
If Comp Qty is picked at 2, then default 3 4 & 5 to blank values, or maybe a "dash".
If the value is blank, the layers are turned off.
 

                               
登录/注册后可看大图

 
 
 
-SlimP
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-5 06:08 , Processed in 0.332254 second(s), 70 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表