yshf 发表于 2014-3-1 10:01:13

表格的行高为什么有时达不到要求

各位行家,以下程序不知为什么有时候表格的行高不是8和4,有时候却又是8和4,是不是与acad.dwt、acadiso.dwt模板有关?(defun c:test()
    (vl-load-com)
    (setq Mspace (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object))))
    (if (setq pt (getpoint "\n表格插入点:"))
      (progn
            (setq Table (vla-AddTable Mspace (vlax-3d-point pt) 10 5 1.0 1.0))
   ;;设置各列宽度
   (setq j 0)
   (mapcar '(lambda(x)(vla-SetColumnWidth table j x)(setq j (1+ j)))
      '(10.0 20.0 15.0 15.0 10.0)
            )
   ;;设置各行高度
            (setq j 0)
   (repeat 10
         (if (= j 0)
      (vla-SetRowHeight table j 8.0)
      (vla-SetRowHeight table j 4.0)
)
         (setq j (1+ j))
   )
)
    )
    (princ)
)
页: [1]
查看完整版本: 表格的行高为什么有时达不到要求