乐筑天下

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

[编程交流] zoom extend and save - PLEASE

[复制链接]

66

主题

1552

帖子

1514

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
325
发表于 2022-7-5 17:19:51 | 显示全部楼层
 
No problem, BIGAL - I just remember that it returns a non-nil value (unless you hit ESC), since Tharwat mentioned this too many times.
 
 
 
Some of us "see" what you did there.  
 
 
Writing it like this may be more readable (atleast for me) :
  1. (if (= "" (getstring "All press A or just  for current ")) (command "zoom" "all" "zoom" ".95x") ;;Zooms to 95% of full screen (load "zoomalltabs"))
回复

使用道具 举报

48

主题

657

帖子

33

银币

限制会员

铜币
-1
发表于 2022-7-5 17:24:47 | 显示全部楼层
So putting it all together, will this do the job?
 
 
  1. (defun c:closer()(setq ans (getstring "All press A or just  for current ")) ;;ans = the key pressed;;If carriage return (or space) is pressed(cond ((= ans "") (command "zoom" "all" "zoom" ".95x") ;;Zooms to 95% of full screen );;else if A (or any other character) is pressed;;Loops through tabs and zooms each tab in turn(t (vlax-for x   (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object) ) )   (setq mylayout (vla-get-Name x))   (setvar "ctab" mylayout)   (command "zoom" "all" "zoom" ".95x") )));;save and close the drawing (command "qsave") ;;saves the drawing (command "close" "y") ;;Closes the drawing
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-14 21:09 , Processed in 0.484906 second(s), 54 queries .

© 2020-2025 乐筑天下

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