prakashreddy Posted April 28, 2015 Share Posted April 28, 2015 Here iam creating table through LISP. This routine is working fine in 2007. Recently we were updated 2014. Tiltle suppressed and header suppressed in working properly. in both cases (vla-put-TitleSuppressed tblstyle :vlax-true) (vla-put-TitleSuppressed tblstyle :vlax-false) it is showing the header and tiltle. code is below (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) ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.