是的,我只是对我能想到的每一个解决方案感到恼火。我试过(vla setscale tb(getvar“dimscale”))
和其他安排,但所有出来的命令提示符相同的语句太少的实际参数!所以我不知道,就像我说的,这是我第一次使用vla格式,所以我还不知道所有的基础知识。你知道该怎么办吗?
- (defun C:ST2(/ col count dis pt row strdis tb va vm vo)
-
- (setq pt (vlax-3d-point (getpoint "\nPick Insertion Point: ")))
- (setq vo (vlax-get-acad-object))
- (setq va (vla-get-activedocument vo))
- (setq vm (vla-get-modelspace va))
- (setq row (+ 1 (getreal "\How many stubs?")))
- (setq col 1)
- (setq dis (getdist "\What Is The First Stub Dimension? : "))
- (if (not (vl-string-search "" (setq strdis (rtos dis 4 4))))
- (setq strdis (strcat strdis "")))
- (setq tb (vla-addtable vm pt row col 1 1))
- (vla-put-titlesuppressed tb :vlax-false)
- (vla-put-headersuppressed tb :vlax-true)
- (vla-put-RegenerateTableSuppressed tb :vlax-true)
- (vla-put-vertcellmargin tb 0.1)
- (vla-put-horzcellmargin tb 0.25)
- (vla-setrowheight tb 0 0.3875)
- (vla-setcolumnwidth tb 0 2.2)
-
- (vla-settextstyle tb actitlerow "bold");title text style
- (vla-settextstyle tb acdatarow "Standard");data rows text style
- (vla-settextheight tb actitlerow 0.27);title text height = 0.27
- (vla-settextheight tb acdatarow 0.21);other cells text height = 0.21
- (vla-setalignment tb actitlerow acmiddlecenter);title alignment
- (vla-setalignment tb acdatarow acmiddlecenter);data cell alignment
- (vla-setformat tb acdatarow "arch");data cell format
- (vla-settext tb 0 0 "STUBS");title text
-
- (setq count 1)
-
- (while (< count row)
- (vla-setcelltextstyle tb count 0 "Standard")
- (vla-setcelldatatype tb count 0 acdouble acunitdistance);optional
- (vla-setrowheight tb count 0.3875)
- (if (= count 1)
- (vla-settext tb count 0 strdis)
- (vla-settext tb count 0 (strcat "= A2*" (itoa count))))
- (setq count (1+ count)))
- (vla-put-RegenerateTableSuppressed tb :vlax-false)
-
- (princ)
- );_ end
-
|