lisp工具转换关闭的采购订单
这个工具只运行了一次就坏了,似乎每个布局只能使用一次?有人能帮我找出它的毛病吗?
我目前拥有的:
;;; vpcl-create-viewport-from-a-polyline
;;; version 0.2
;;;
(defun c:vpcl (/ clgr vpla ; polyline viewport-orriginal
)
(princ "\n**select-polyline\n")
(command "_mspace") ;to be sure
(setq clgr (car (entsel "Select polyline to convert.") ) )
(princ "\n**chspace\n")
(command "_chspace" clgr "" )
(princ "\n**pspace\n")
(command "_pspace")
(princ "\n**vports\n")
(command "-vports" "o" clgr )
(princ "\n**select-vp\n")
(setq vpla (car (entsel "Select main viewport to sync with.") ) )
(princ "\n**vpsync"\n)
(command "_vpsync" );vpla clgr "\n" )
(princ "\n**ready\n")
)
不需要lisp。。。
您也可以使用MView命令来完成。
如。
Command: mv
MVIEW
Specify corner of viewport or
<Fit>: o
Select object to clip viewport: Regenerating model.
Command: Specify opposite corner: 布局中也有标题栏有一个大的模型视图近似标题栏,您可以使用chspace将多段线拖动到图纸空间,然后MV ob拾取pline删除模型视图外部不再需要。
抱歉再次阅读Alans,但添加了chspace 谢谢你们的提示,我试着做些改变。
敬请期待 顺便说一句,我不想做任何剪辑,在视口中使用视口的想法是让大视口中的所有内容都变灰,新创建的视口颜色应该保持不变。
比如突出显示你想关注的某个区域,而不会忽略绘图的其余部分。 ;;; vpcl-viewport-van-clustergrens
;;; versie 0.2
;;;
(defun c:vpcl (/ clgr;
)
(command "_mspace") ;voor de zekerheid
(setq clgr (entsel "Select clustergrens om te converteren.") )
(command "_chspace" (car clgr) "" )
(command "_pspace")
(command "-vports" "o" clgr ) ;assume last created object is our viewport
(princ "")
;Here is the place to implement a "VPSYNC"-like routine
;followed by vp-plotstyle overrides voor de `master'viewport
)
这是我们制作的工具的更新,唯一的问题是我们不能在lisp中使用vpsync。有什么帮助吗? 这可能会帮你,伙计。
(defun c:vpcl (/ ss ent)
;; Tharwat 26. 07. 2011
(cond ((not
(eq (vla-get-Activespace
(vla-get-activedocument (vlax-get-acad-object))
)
acPaperSpace
)
)
(princ "\n ** Command not allowed in Model Tab ** ")
)
((not (and (setq ss (ssget "_+.:L:S" '((0 . "LWPOLYLINE"))))
(vlax-curve-isclosed (setq ent (ssname ss 0)))
)
)
)
((command "_.mview" "_object" ent))
)
(princ)
)
塔瓦特
谢谢你,伙计!但这是否也同步了这两个视口? 如果你说的是命令vpsync,我说不,它只是将一条lwpolyline转换成一个视口。
页:
[1]
2