乐筑天下

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

[编程交流] Need Help! Rev-cloud Lisp!

[复制链接]

9

主题

48

帖子

39

银币

初来乍到

Rank: 1

铜币
45
发表于 2022-7-5 12:55:12 | 显示全部楼层 |阅读模式
Hi Everyone! Help me!
        I just modify Rev-Cloud Lisp using "RECTANG" Command.
        I want to change last step! we need after finish Rev-Cloud to set Rotation "0" in "RECTANG" Command. 
         
  1. (defun C:Revc () (defun *error* (msg)    (if acDoc      (vla-endundomark acDoc)    )    (cond ((not msg))                                                   ; Normal exit          ((member msg '("Function cancelled" "quit / exit abort")))    ;  or (quit)          ((princ (strcat "\n** Error: " msg " ** ")))    )                                                                   ; Fatal error, display it    (princ)  )(defun RtoD (nbrOfRadians)  (/ (* nbrOfRadians 180.0) pi))(defun DtoR (nbrOfDegrees)  (* (/ nbrOfDegrees 180.0) pi))   (if (not (tblsearch "LAYER" "REV"))        (entmakex '((0 . "LAYER")                    (100 . "AcDbSymbolTableRecord")                    (100 . "AcDbLayerTableRecord")                    (2 . "REV")                    (70 . 0)                    (62 . 10)                    (6 . "Continuous")                   )        )      )      (setvar 'clayer "REV")  (setq oldosmode (getvar 'osmode))  (setq ang (getvar 'snapang))  (setvar 'osmode 0)  (setq ang1 (cvunit ang "radians" "degrees"))  (command "_.rectang" pause "R" ang1 pause)  (while (> (getvar 'CmdActive) 0) (command pause))  (setq rec (entlast))  (setq arc (getvar 'DIMSCALE)) (initget "Yes No")  (setq    cloud (getkword "Reverse Cloud direction [Yes/No] : ")    cloud (cond (cloud) (T "No")); No for Enter  )     (command "_.REVCLOUD" "_Style" "_Normal" "_Arc" (* arc 2.5) "" "_Object" rec cloud)     (command "_.rectang" "_none" "0,0" "R" 0 "_none" "0,0")     (setq del (entlast))     (command "_.erase" del "")     (setvar "clayer" "0")     (setvar 'osmode oldosmode)(vl-load-com)(princ) )
 
回复

使用道具 举报

28

主题

317

帖子

292

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
140
发表于 2022-7-5 13:34:54 | 显示全部楼层
Hi there!
        Between the (vl-load-com) and the (princ) lines (at the end), add these 2 lines
  1. (command "_.rectang" "0,0" "R" "0" "1,1")(entdel (entlast))
it will leave the rotation of rectangle at 0 after execution.
        If this solves your problem, please mark this reply accordingly. Thanks and cheers.
回复

使用道具 举报

9

主题

48

帖子

39

银币

初来乍到

Rank: 1

铜币
45
发表于 2022-7-5 14:17:31 | 显示全部楼层
Hi Jef!
        Thanks for your's help!.Now it's working fine.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-15 00:44 , Processed in 2.438485 second(s), 58 queries .

© 2020-2025 乐筑天下

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