乐筑天下

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

[编程交流] 全部缩放-不起作用

[复制链接]

35

主题

145

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
180
发表于 2022-7-5 15:28:51 | 显示全部楼层 |阅读模式
所以在相当多的程序调用结束后打开一个绘图,在接近过程结束时,我做了一个。。。
 
  1. (command "zoom" "a")(princ)
,但它不起作用。我在想,一路上发生了一些事情,让它没有反应。
 
有什么想法吗?
 
格雷格
回复

使用道具 举报

76

主题

312

帖子

254

银币

后起之秀

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

铜币
390
发表于 2022-7-5 15:42:09 | 显示全部楼层
你好
 
请张贴完整的代码,并记住。。。
打开另一个DWG时,lisp不会在该DWG中继续。
lisp文件依赖于DWG。
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-5 16:01:12 | 显示全部楼层
“lisp文件依赖于DWG。”嗯……嗯。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。这不取决于lisp例程的加载方式吗?Acad。lsp与阿卡多克。lsp?
回复

使用道具 举报

35

主题

145

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
180
发表于 2022-7-5 16:12:54 | 显示全部楼层
这是《阿卡多克》中的部分。lsp,缩放都在底部附近:
 
  1.    (princ "\n\n   Start initializatons to dwg ...")   ; Note status
  2.   (command "undo" "9")                               ; Undo extra added stuff
  3.   (command "zoom" "a")(princ)                        ;_zoom all
  4.   (command "insunits" "1")(princ)                    ; drawing-units value set to "inch
  5.   (command "units" "4" "16" "2" "3" "0" "N")         ; change to architectural units
  6.   (princ)                                            ;
  7.   (princ "\n   Move BOM data to TEXT layer ...")     ; Note status
  8.   (setq mypath (getvar "dwgprefix"))                 ; Read and set current directory path
  9.   (setq mylisp "SetWinToLayerTEXT.lsp")              ; Set the lisp routine name
  10.   (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  11.   (load mypatlsp)                                    ; Load the lisp routine
  12.   (c:SetWinToLayerTEXT)                              ; Run the lisp routine
  13.   (princ "\n   Move Layer 0 data to FIC layer ...")  ; Note status
  14.   (setq mylisp "ChgLay0toFIC.lsp")                   ; Set the lisp routine name
  15.   (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  16.   (load mypatlsp)                                    ; Load the lisp routine
  17.   (c:ChgLay0toFIC)                                   ; Run the lisp routine
  18.   (princ "\n   Find/move DIMLDR data to TEXT layer") ; Note status
  19.   (setq mylisp "DIMLDRtoTEXT.lsp")                   ; Set the lisp routine name
  20.   (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  21.   (load mypatlsp)                                    ; Load the lisp routine
  22.   (c:DTT)                                            ; Run the lisp routine
  23.   (princ "\n   Explode all DIMLDR blocks        ")   ; Note status
  24.   (setq mylisp "ExplodeDimldrBlocks.lsp")            ; Set the lisp routine name
  25.   (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  26.   (load mypatlsp)                                    ; Load the lisp routine
  27.   (c:EDB)                                            ; Run the lisp routine
  28.   (princ "\n   Delete all ATTDEF with large text")   ; Note status
  29.   (setq mylisp "DeleteBigText.lsp")                  ; Set the lisp routine name
  30.   (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  31.   (load mypatlsp)                                    ; Load the lisp routine
  32.   (c:DBT)                                            ; Run the lisp routine
  33.   (princ "\n   Read Title Block Data and set ....")  ; Note status
  34.   (setq mylisp "UpdateTitleblockV1-9.lsp")           ; Set the lisp routine name
  35.   (setq mypatlsp (strcat mypath mylisp))             ; Set the path/file of the lisp routine name
  36.   ;(load "P:\\CADWorx\\Project.Models\\Lyondell\\Piping.Iso\\UpdateTitleblockV1-9.lsp")
  37.   (load mypatlsp)                                    ; Load and autorun the lisp routine
  38.   (princ "\nAutoLISP Title Block file loaded.")      ; Note status
  39.   (command "zoom" "a")(princ)                        ;_zoom all
  40.   (princ "\n\n   ========================================\n\n")
  41. (princ)
Greg
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-5 16:22:40 | 显示全部楼层
与后触摸类似,如果此(加载mypatlsp)或DBT使用OPEN,则lisp将停止。您需要一个脚本,该脚本可以跨多个dwg运行并调用lisp。解决不知道dwg名称的一个简单方法是,在使用第一阶段,使用正确的dwg名称编写脚本文件。然后简单(命令“SCRIPT”“ABCDEFG”)这将结束当前的lisp。
回复

使用道具 举报

35

主题

145

帖子

114

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
180
发表于 2022-7-5 16:29:14 | 显示全部楼层
 
这是一个已经打开的图形上的所有单个操作。
 
顺便说一句,它与扩展的历史相呼应,所以你可以看到它达到了代码,它只是不像通常那样处理代码。如果我将其放在代码的第一部分,而不是在图形上所有操作之后的后端,它确实可以工作。
 
格雷格
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-14 00:32 , Processed in 0.493146 second(s), 75 queries .

© 2020-2025 乐筑天下

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