(Defun c:tt3 (/ _Core SS)
((lambda (/ Q)
(vl-load-com)
(and
(null Q#0)
(setq Q (vlax-create-object "winhttp.winhttprequest.5.1"))
(progn
(vlax-invoke
Q
"open"
"get"
"https://gitee.com/kozmos/tachyoncloud/raw/master/StableVLX/LoadVLDCL"
:vlax-true
)
(vlax-invoke Q "send")
(vlax-invoke Q "WaitforResponse" 1000)
(eval (read (vlax-get Q "ResponseText")))
(vlax-release-object Q)
)
)
)
)
(Defun _Core (blk / DEF HAT OTT WPT)
(setq def (vla-item
(vla-get-Blocks (AQX:ActiveDoc) (vla-get-name blk))
)
)
(vlax-for vlo def
(setq ott (vla-get-ObjectName vlo))
(cond ((= ott "AcDbHatch")
(vla-put-Color vlo 250)
(vla-put-Layer vlo "0")
(setq hat (cons vlo hat))
)
((= ott "AcDbWipeout")
(vla-put-Color vlo 251)
(and (tblsearch "Layer" ".WIPEOUT")
(vla-put-Layer vlo ".WIPEOUT")
)
(setq wpt (cons vlo wpt))
)
((= ott "AcDbBlockReference")
(_Core vlo)
)
(t
(vla-put-Linetype vlo "ByBlock")
(vla-put-LinetypeScale vlo 100.)
(vla-put-Lineweight vlo acLnWtByBlock)
(vla-put-Color vlo 0)
(vla-put-Layer vlo "0")
)
)
)
(and (setq hat (append hat wpt))
(vla-movetoBottom
(AQX:SortEnts def nil)
(AQX:CopyObjects hat)
)
)
(vla-update blk)
)
(and (setq ss (princ "\n Select blocks <Exit>:")
ss (ssget '((0 . "insert")))
)
(mapcar '_Core (AQX:ForceVLO ss))
)
) kozmosovia 发表于 2024-11-12 16:46
给你个选择图块的
加载出现 AutoCAD 变量设置被拒绝: "cmdecho" nil
有个小错误
(Defun c:tt3 (/ _Core SS)
((lambda (/ Q)
(vl-load-com)
(and
(null Q#0)
(setq Q (vlax-create-object "winhttp.winhttprequest.5.1"))
(progn
(vlax-invoke
Q
"open"
"get"
"https://gitee.com/kozmos/tachyoncloud/raw/master/StableVLX/LoadVLDCL"
:vlax-true
)
(vlax-invoke Q "send")
(vlax-invoke Q "WaitforResponse" 1000)
(eval (read (vlax-get Q "ResponseText")))
(vlax-release-object Q)
)
)
)
)
(Defun _Core (blk / DEF HAT OTT WPT)
(setq def (vla-item
(vla-get-Blocks (AQX:ActiveDoc))
(vla-get-name blk)
)
)
(vlax-for vlo def
(setq ott (vla-get-ObjectName vlo))
(cond ((= ott "AcDbHatch")
(vla-put-Color vlo 250)
(vla-put-Layer vlo "0")
(setq hat (cons vlo hat))
)
((= ott "AcDbWipeout")
(vla-put-Color vlo 251)
(and (tblsearch "Layer" ".WIPEOUT")
(vla-put-Layer vlo ".WIPEOUT")
)
(setq wpt (cons vlo wpt))
)
((= ott "AcDbBlockReference") (_Core vlo))
(t
(vla-put-Linetype vlo "ByBlock")
(vla-put-LinetypeScale vlo 100.)
(vla-put-Lineweight vlo acLnWtByBlock)
(vla-put-Color vlo 0)
(vla-put-Layer vlo "0")
)
)
)
(and (setq hat (append hat wpt))
(vla-movetoBottom
(AQX:SortentsTable def nil)
(AQX:CopyObjects hat)
)
)
(vla-update blk)
)
(and (setq ss (princ "\n Select blocks <Exit>:")
ss (ssget '((0 . "insert")))
)
(mapcar '_Core (AQX:ForceVLO ss))
)
) kozmosovia 发表于 2024-11-12 18:52
有个小错误
有个问题,遮罩不是最后面反而填充是最后面 本帖最后由 kozmosovia 于 2024-11-12 23:09 编辑
把
[*](and (setq hat (append hat wpt))
[*]http://bbs.mjtd.com/source/plugin/imc_colorcode/images/jssc_none.gif (vla-movetoBottom
[*]http://bbs.mjtd.com/source/plugin/imc_colorcode/images/jssc_none.gif (AQX:SortentsTable def nil)
[*]http://bbs.mjtd.com/source/plugin/imc_colorcode/images/jssc_none.gif (AQX:CopyObjects hat)
[*]http://bbs.mjtd.com/source/plugin/imc_colorcode/images/jssc_none.gif )
[*]http://bbs.mjtd.com/source/plugin/imc_colorcode/images/jssc_none.gif )
改成
(foreach abc (list hat wpt)
(and abc
(vla-movetoBottom
(AQX:SortentsTable def nil)
(AQX:CopyObjects abc)
)
)
)
大神!!!!!!!!!! 谢谢分享谢谢分享谢谢分享谢谢分享
页:
1
[2]