发布于:2011-03-29 09:36:29
来自:给排水工程/天正给排水
[复制转发]
尝试着用了天正的喷淋布置,当计算完成显式管径后,由于图中管段较短,标注管径相互遮挡,需要隐藏部分管径,我觉得用属性一个一个地改太烦,做了一个LSP,加快了速度:(好处先不说了)
(defun c:WZ(/ PIPE-text)
(princ "选择天正管线->隐藏文字:")
(ssget '((0 . "TCH_PIPE")(300 . "喷淋")))
(vlax-for PIPE-text (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
(vlax-put-property PIPE-text 'drawlabel "否"))
(princ))
懂的人可以看看啊,LSp并不难
同样,所有喷头上下喷图例不一样,有时可以批量修改:
;;;天正喷头上下喷
(defun c:pt(/ equip-sprink)
(princ "选择天正喷头->上中下喷:")
(ssget '((0 . "TCH_EQUIPMENT")(8 . "EQUIP_喷淋")))
(vlax-for equip-sprink (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
(vlax-put-property equip-sprink 'hidepipe "否"))
(princ))
还有一个管线比例问题,我画图用1:1mm,出图用1:100mm,图形ltscale为1000,打算线宽全用0.5mm制图:
;;;天正管线比例 线宽
(defun c:wp(/ PIPE)
(princ "选择天正管线比例<0.4>:")
(ssget '((0 . "TCH_PIPE")(300 . "喷淋")))
(vlax-for PIPE (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
(vlax-put PIPE 'linetypescale 0.4)
(vlax-put PIPE 'pipeweight 0.5)
)
(princ))
重新定义快捷键:(你懂的)
;;;绘制管线
(defun c:h(/)
(command "hzgx"))
;;;矩形喷头
(defun c:aa(/)
(command "jxpt"))
还有,天正每次计算后显式预定义的字体,我想修改过来,重新计算后还得改:
(defun c:WZa(/ PIPE-text)
(princ "选择天正管线->文字字体修改:")
(ssget '((0 . "TCH_PIPE")(300 . "喷淋")))
(vlax-for PIPE-text (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)))
(vlax-put-property PIPE-text 'textstyle "CXB_TXT"))
(princ));;;CXB_TXT过是我想要的字体
刚刚才试用,说得不妥处请谅解:) 不好意思啊,我用了盗版
全部回复(5 )
只看楼主 我来说两句回复 举报
回复 举报