1、LISP源码在AUTOCAD(2004-2019)下执行。 2、LISP源码加载方法: a.拷贝代码保存成扩展名.lsp的文件 b.CAD下执行命令APPLOAD,找到保存的LSP 文件, 点加载按钮。 如同WIN 下很多软件需要 VC 运行库支持一样,下面 LISP 源码执行前需要LISP 通用函数库(XDRX API)加载 一次即可,自行百度下载。 [Diff]纯文本查看 复制代码 (defunc:XDTB_ZHIWUBATDIM blknameblknames box coords mlmls name namesp1 p2 pts scl ss ss1 val (defun_make_mleader (blkname pts) (xdrx_object_get“mleaderstyle” “zbbz”)) (setqmls (xdrx_mleader_makestyle “zbbz”)) (xdrx_setpropertyvaluemls “dogleglength” 2.0) (xdrx_setpropertyvaluemls “TextAttachmentType” (xdrx_setpropertyvaluemls “LandingGap” 0.0) (xdrx_setpropertyvaluemls “Scale” 1.0) (xdrx_getpropertyvaluemls “ArrowSymbolId” “_None”) (setvar“cmleaderstyle” “zbbz”) (lengthpts) (xdrx_polyline_makepts) (setqcoords (vl-sort pts „(lambda coords(car coords) (setqscl (xd::var:getratio)(xd::var:getscaleratio)) ml(xdrx_mleader_make coords (setq p1 (polar coords pi2.0) 10.0scl) (strcatblkname (itoa(length pts)) scl#xd_var_global_txtheight) 2.0scl) (xdrx_setpropertyvalue(entlast) “textlinespacingstyle” “TextLineSpacingFactor”0.8 “textheight” scl#xd_var_global_txtheight) (setqss1 (xdrx_getss)) (xdrx_setpropertyvaluess1 “color” “layer”“标注-植物”) (_overlap_checkml) (defun_overlap_check (ml boxss) (setqbox (xdrx_getpropertyvalue ml “textbox”)) (setqss (ssget “cp” box (xdrx_setpropertyvalueml “mirror” (xdrx_object_regenml) (setqbox (xdrx_getpropertyvalue ml “textbox”)) (setqss (ssget “cp” box (xdrx_setpropertyvalueml “textrotation” PI) (defun_make (ss blkname) 正在标注:”blkname) (setqpts (mapcar (xdrx_pickset-entsss) (setqpts (xd::pnts:groupbygap pts #xd_var_global_entity_group_gap nil) (_make_mleaderblkname (xdrx_polyline_makelxd) (setq#xd_var_global_txtheight 4.0) (setqval (getreal (xdrx_prompt (setq#xd_var_global_txtheight val) (setq#xd_var_global_entity_group_gap 6.0) (setqval (getreal (xdrx_prompt (setq#xd_var_global_entity_group_gap val) (setqnames nil blknamesnil ssnil 已选中图块:”(setq blknames (xdrx_string_joinnames (car(xdrx_entsel (setqname (xdrx_getpropertyvalue “blocktablerecord”nil)) (membername names)) (xdrx_entity_redraw(setq ss (ssget (setqnames (cons name names)) (setqp1 (getpoint (setqp2 (XD::Doc:Getcorner p1 (getvar“ucsxdir”) (xdrx_entity_redrawss (setqss (ssget “cp” (cadr p2) (list (_makess 百度搜索“就爱阅读”,专业资料,生活学习,尽在就爱阅读网92to.com,您的在线图书馆!