56
256
230
后起之秀
[use current origin/Set new origin/Default to boundary extents] <Use current origin>:[bottom Left/bottom Right/top rIght/top lEft/Center] <bottom Left>:] <bottom Left>:
;;-----------------=={ Hatch_Origin_Location.lsp }==--------------------;;;; Author: 3dwannab, 2017;;----------------------------------------------------------------------;;;; Version 0.1 - 18-03-2017;;----------------------------------------------------------------------;;;; Hatch Location Options:;; BottomLeft/BottomRight/TopRight/TopLeft/Center/Pick;;----------------------------------------------------------------------;;(defun c:HOL nil (c:Hatch_Origin_Location))(defun c:Hatch_Origin_Location ( / *error* os cmde pt ss ent data ans)(defun *error* (errmsg) (and acDoc (vla-EndUndoMark acDoc)) (and errmsg (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*")) (princ (strcat "\n<< Error: " errmsg " >>")) ) (setvar 'cmdecho cmde) (setvar 'osmode os) (princ) )(setq acDoc (vla-get-ActiveDocument (vlax-get-acad-object)))(or (vla-EndUndoMark acDoc) (vla-StartUndoMark acDoc))(setq os (getvar "osmode"))(setq cmde (getvar "cmdecho"))(initget "BottomLeft BottomRight TopRight TopLeft Center Pick")(setq ans (getkword "\nChoose Hatch Origin Location ? [bottomLeft/BottomRight/TopRight/TopLeft/Center/Pick] <Pick>: "))(cond ( (= "Pick" ans) (sssetfirst) (and (setq ent (entsel "\n Select Hatch: ")) (setq pt (getpoint "\n New Hatch Origin:")) (command "._HatchEdit" ent "O" "S" pt "N") ) ) )(cond ( (/= "Pick" ans) (if (setq ss (ssget "_:L" '((0 . "HATCH"))) ) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i))) data (entget ent) ) (progn (cond ( (= "BottomLeft" ans) (command "._HatchEdit" ent "O" "D" "L" "N")(princ) ) ( (= "BottomRight" ans) (command "._HatchEdit" ent "O" "D" "R" "N")(princ) ) ( (= "TopRight" ans) (command "._HatchEdit" ent "O" "D" "I" "N")(princ) ) ( (= "TopLeft" ans) (command "._HatchEdit" ent "O" "D" "E" "N")(princ) ) ( (= "Center" ans) (command "._HatchEdit" ent "O" "D" "C" "N")(princ) ) ) ) ) ) ) )(*error* nil)(princ))(vl-load-com)(princ(strcat "\n:: Hatch_Origin_Location.lsp | Version 0.1 | \\U+00A9 3dwannab " (menucmd "m=$(edtime,0,yyyy)") " ::" "\n:: Type "HOL" or "Hatch_Origin_Location" to Run ::" ))(princ)
使用道具 举报
0
61
62
限制会员
(if (not ans) (setq ans "Pick"))
(command-s "._HatchEdit" pause "O" "D" "L" "N")
;;-----------------=={ Hatch_Origin_Location.lsp }==--------------------;;;; Author: 3dwannab, 2017;;----------------------------------------------------------------------;;;; Version 0.1 - 18-03-2017;;----------------------------------------------------------------------;;;; Hatch Location Options:;; BottomLeft/BottomRight/TopRight/TopLeft/Center/Pick;;----------------------------------------------------------------------;;(defun c:HOL nil (c:Hatch_Origin_Location))(defun c:Hatch_Origin_Location ( / *error* os cmde mutt pt ss ent data ans)(defun *error* (errmsg) (and acDoc (vla-EndUndoMark acDoc)) (and errmsg (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*")) (princ (strcat "\n<< Error: " errmsg " >>")) ) (setvar 'cmdecho cmde) (setvar 'osmode os) (setvar 'nomutt mutt) (princ) )(setq acDoc (vla-get-ActiveDocument (vlax-get-acad-object)))(or (vla-EndUndoMark acDoc) (vla-StartUndoMark acDoc))(setq os (getvar "osmode"))(setq cmde (getvar "cmdecho"))(setq ex (getvar "expert"))(setq mutt (getvar "nomutt"))(progn (setvar 'cmdecho 0) (setvar 'osmode 0) (setvar 'nomutt 1) (initget "bottomLeft bottomRight toprIght toplEft Center Pick") (setq ans (getkword "\nX Brick Size (Standard=112.5 Joint=10)? [bottom Left/bottom Right/top rIght/top lEft/Center/Pick] <Pick>: ")) (if (not ans) (setq ans "Pick")) (cond ((= "Pick" ans) (sssetfirst) (and (setq ent (entsel "\n Select Hatch: ")) (setq pt (getpoint "\n New Hatch Origin:")) (command "._HatchEdit" ent "O" "S" pt "N") ) ) ) (cond ((/= "Pick" ans) (if (setq ss (ssget "_:L" '((0 . "HATCH"))) ) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i))) data (entget ent) ) (cond ((= "bottomLeft" ans) (command-s "._HatchEdit" ent "O" "D" "L" "N")(princ) ) ((= "bottomRight" ans) (command-s "._HatchEdit" ent "O" "D" "R" "N")(princ) ) ((= "toprIght" ans) (command-s "._HatchEdit" ent "O" "D" "I" "N")(princ) ) ((= "toplEft" ans) (command-s "._HatchEdit" ent "O" "D" "E" "N")(princ) ) ((= "Center" ans) (command-s "._HatchEdit" ent "O" "D" "C" "N")(princ) ) ) ) ) ) ) T )(*error* nil)(princ))(vl-load-com)(princ(strcat "\n:: Hatch_Origin_Location.lsp | Version 0.1 | \\U+00A9 3dwannab " (menucmd "m=$(edtime,0,yyyy)") " ::" "\n:: Type "HOL" or "Hatch_Origin_Location" to Run ::" ))(princ)
本版积分规则 发表回复 回帖后跳转到最后一页
微信公众平台
扫描访问手机版
点击图片下载手机App
|关于我们|小黑屋|乐筑天下 繁体中文
GMT+8, 2025-7-3 20:10 , Processed in 0.545441 second(s), 59 queries .
© 2020-2025 乐筑天下
在线时间:10:00-17:00
暂无
扫一扫,关注我们
帮助中心
关于我们
下载APP客户端