langke52
发表于 2017-12-27 13:20:35
楼主辛苦了。
lgflysnow
发表于 2018-1-16 13:25:45
11楼主的隐藏反选在cad中只是一闪而过就会全部隐藏了,没有将不需要隐藏的那个互动做好呢,不知各位试过了没有,不过还是谢谢啦
一般般
发表于 2018-1-20 23:08:08
楼主,确实隐藏反选是将所有的都隐藏了呢
asd19400
发表于 2018-9-15 13:57:51
设置一个改快捷键的对话框就好了
xiaoquansb
发表于 2018-9-17 12:57:01
很给力
疯球
发表于 2018-9-24 21:44:57
楼主辛苦了。
yuan4399
发表于 2018-10-20 18:57:01
感谢分享无私分享,你辛苦了
CAD新军
发表于 2018-11-17 01:21:46
自己捣鼓半天发现别人都写好了
669423907
发表于 2018-11-17 15:00:10
反向隐藏,把全部都隐藏了,不知道要改哪里呢?
;[隐藏物体(反)]
(defun GL:yfwt (/ AcadObject AcadDocument LayersObj ssObj ss ob n i ent ob ss2 ss3 lay vlay lay-tn)
(setq AcadObject (vlax-get-acad-object)
AcadDocument (vla-get-ActiveDocument AcadObject)
LayersObj (vla-get-layers AcadDocument)
);end setq
(princ "\n请选择不需要隐藏的物体" )
(if (setq ss (ssget))
(progn
(setq ss2 (ssget "x" ))
(setq n (sslength ss))
(setq i (- n 1))
(repeat n
(setq ent (ssname ss i))
(if (setq ss3 (ssdel ent ss2))
(setq ss2 ss3)
);end if
(setq i (1- i))
);end repeat
(sssetfirst nil ss2)
(setq ssObj (vla-get-ActiveSelectionSet AcadDocument))
(vlax-for ob ssObj
(setq lay (vla-get-layer ob)
vlay (vla-item LayersObj lay)
);end setq
(if (= (setq lay-tn (vla-get-lock vlay)) :vlax-true)
(vla-put-lock vlay :vlax-false)
);end if
(vla-put-visible ob :vlax-false)
(if (= lay-tn :vlax-true)
(vla-put-lock vlay :vlax-true)
);end if
);end vlax-for
(princ "\n已隐藏非选择物体" )
));end if
(sssetfirst nil nil)
(princ)
)
669423907
发表于 2018-11-17 16:30:44
反向隐藏可以了,再次感谢各位
;[隐藏物体(反)] edata 20181117改
(defun GL:yfwt (/ acaddocument acadobject ent1 ent2 lay lay-tn layersobj ob ss ss2 vlay)
(setq AcadObject (vlax-get-acad-object)
AcadDocument (vla-get-ActiveDocument AcadObject)
LayersObj (vla-get-layers AcadDocument)
) ;end setq
(princ "\n请选择不需要隐藏的物体")
(if (setq ss (ssget))
(progn
(setq ss2 (ssget "x"))
(while (setq ent1 (ssname ss 0))
(ssdel ent1 ss2)
(ssdel ent1 ss)
) ;end while 1
(while (setq ent2 (ssname ss2 0))
(setq ob (vlax-ename->vla-object ent2))
(setq lay(vla-get-layer ob)
vlay (vla-item LayersObj lay)
) ;end setq
(if (= (setq lay-tn (vla-get-lock vlay)) :vlax-true)
(vla-put-lock vlay :vlax-false)
) ;end if
(vla-put-visible ob :vlax-false)
(if (= lay-tn :vlax-true)
(vla-put-lock vlay :vlax-true)
) ;end if
(ssdel ent2 ss2)
) ;end while 2
(princ "\n已隐藏非选择物体")
)
) ;end if
(princ)
)
页:
1
2
3
4
5
6
7
[8]
9
10