表ブロックの再生成を有効/無効にします。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: ブール型
Table イブジェクトを変更するすべてのメソッドは、次のことを行います。
表の再計算では Table オブジェクトがゼロから再構築されるので、大きな表の再計算には多くの時間とメモリを必要とします。
パフォーマンスの問題を回避するには、API で大きな表を修正するときに、Table オブジェクトの再構築を一時的に禁止します。次に、修正を適用し、再構築を有効にします。
VBA:
Sub Example_RegenerateTableSuppressed()
Dim MyModelSpace As AcadModelSpace
Dim MyTable As IAcadTable
Dim pt(2) As Double
Set MyModelSpace = ThisDrawing.ModelSpace
Set MyTable = MyModelSpace.AddTable(pt, 100, 5, 5, 10)
'Temporarily disable the recomputing of table block
MyTable.RegenerateTableSuppressed = True
Dim i As Integer, j As Integer
For i = 0 To 99
For j = 0 To 4
Call MyTable.SetText(i, j, "my string " & i & ", " & j)
Next j
Next i
'Now force the recomputing of table block
'so that we can see the update table results
MyTable.RegenerateTableSuppressed = False
'You can also call RecomputeTableBlock(true) instead
'to force the regeneration of table
'MyTable.RecomputeTableBlock(True)
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_RegenerateTableSuppressed()
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq pt (vlax-3d-point 0 0 0))
(setq MyModelSpace (vla-get-ModelSpace doc))
(setq MyTable (vla-AddTable MyModelSpace pt 100 5 5 10))
;; Temporarily disable the recomputing of table block
(vla-put-RegenerateTableSuppressed MyTable :vlax-true)
(setq i 1
j 0)
(while (>= 99 i)
(while (>= 4 j)
(vla-SetText MyTable i j (strcat "my string " (itoa i) ", " (itoa j)))
(setq j (1+ j))
)
(setq i (1+ i)
j 0)
)
;; Now force the recomputing of table block
;; so that we can see the update table results
(vla-put-RegenerateTableSuppressed MyTable :vlax-false)
;; You can also call (vla-RecomputeTableBlock obj :vl;ax-true) instead
;; to force the regeneration of table
;;(vla-RecomputeTableBlock MyTable :vlax-true)
)