prakashreddy 发表于 2022-7-5 19:51:30

弗拉在201年将标题上调

在这里,我通过LISP创建表格。这一惯例在2007年运作良好。最近,我们更新了2014年。倾斜抑制和收割台抑制工作正常。
 
在这两种情况下
 
(vla put TitleSuppressed tblstyle:vlax true)
(vla put标题支持tblstyle:vlax false)
 
它显示了收割台和倾斜装置。
 
代码如下
 
(defun c:tab (/ tblstyle adoc)
(setq tHt 2)
(setq name   "BOM_table"
       desc   "BOM table"
       txtstyle "bom_text"
       h1       (* 2 tHt)
       h2       (* 2 tHt)
       h3       tHt
)
(or (vl-load-com))
(setq tblstyle (vla-addobject
                  (vla-item (vla-get-dictionaries (setq adoc (vla-get-activedocument (vlax-get-acad-object))))
                            "Acad_Tablestyle"
                  )
                  name
                  "AcDbTableStyle"
                )
)
(setq acmCol (vla-getinterfaceobject
                (vlax-get-acad-object)
                (strcat "AutoCAD.AcCmColor." (substr (getvar "ACADVER") 1 2))
            )
)
(vla-put-name tblstyle name)
(vla-put-TitleSuppressed tblstyle :vlax-true)
(vla-put-headersuppressed tblstyle :vlax-true)
(vla-put-description tblstyle desc)
(vla-put-flowdirection tblstyle 1)
(vla-put-bitflags tblstyle 1)
(vla-put-horzcellmargin tblstyle 0.25)
(vla-put-vertcellmargin tblstyle 0.25)
;;;(vla-settextstyle tblstyle 7 txtstyle)
(vla-settextheight tblstyle 1 h3)
(vla-settextheight tblstyle 4 h2)
(vla-settextheight tblstyle 2 h1)
;;;(vla-setrgb acmCol 204 102 0)
(vla-put-colorindex acmCol 1)
(vla-setgridcolor tblstyle 63 7 acmCol)
(vla-setgridvisibility tblstyle 63 7 :vlax-true)
(vla-setgridlineweight tblstyle 18 7 aclnwt009)
(vla-setgridlineweight tblstyle 45 7 aclnwt050)
(vlax-release-object acmCol)
(setvar "CTABLESTYLE" "BOM_table")
(setq acmCol (vla-getinterfaceobject
                (vlax-get-acad-object)
                (strcat "AutoCAD.AcCmColor." (substr (getvar "ACADVER") 1 2))
            )
)
(setq mSp (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object))))
(setq vlaTab (vla-AddTable mSp (vlax-3D-point (list 0 0 0)) 4 4 (* 2 tHt) (* 10 tHt)))

;;;(vla-DeleteRows vlaTab 0 2)

)
页: [1]
查看完整版本: 弗拉在201年将标题上调