乐筑天下

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

[编程交流] About get_tile, setting flags,

[复制链接]

10

主题

29

帖子

19

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-5 17:28:47 | 显示全部楼层 |阅读模式
I am trying to set up a nested dialog box and use autocad commands in it.
 
However, I have learned that we cannot do so while the dialog box is open. So my way of going around is that set a dummy variable to a value, then close dialog box, then use the command.
 
Part of my code is like this:
 
  1.   (cond ((= get_tile "T" 1) (setq choices 1)) ((= get_tile "S" 1) (setq choices 2))((= get_tile "C" 1) (setq choices 3))((= get_tile "I" 1) (setq choices 4)))
 
Since my buttons "T", "S", "C", "I" are just regular buttons, I do not think get_tile can achieve what I want here.
 
Also, will the variable choices be stored throughout the whole program or just this function?
 
Thanks for any responses!
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 18:01:02 | 显示全部楼层
Use the done_dialog function within the action_tile statement for your buttons, supplied with a positive integer argument other than 1 & 0 (these should be reserved for accept/cancel tiles); then test for the integer returned by the start_dialog function to determine which button was pressed and hence which operation to perform.
回复

使用道具 举报

10

主题

29

帖子

19

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-5 18:14:56 | 显示全部楼层
 
Yes! It worked. Instead of using get_tile, I can just use the value I put in done_tile. I set up a variable to the return value of start_dialog, then go from there.
 
As always, THANK YOU Lee Mac!
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-5 18:38:40 | 显示全部楼层
You're welcome! - I'm glad you were able to develop a solution.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-13 03:14 , Processed in 0.353083 second(s), 60 queries .

© 2020-2025 乐筑天下

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