指定した行および列のセルのデータ タイプと単位タイプを取得します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.GetCellDataType row, col, pDataType, pUnitType
タイプ: Table
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: 長整数型
設定するセルの行番号。
アクセス: 入力のみ
タイプ: 長整数型
設定するセルの列番号。
アクセス: 出力のみ
タイプ: AcValueDataType 列挙型
セルのデータ タイプ。
アクセス: 出力のみ
タイプ: AcValueUnitType 列挙型
セルの単位タイプ。
戻り値はありません。
追加の注意はありません。
VBA:
Sub Example_CellManipulation()
    ' This example adds a table in model space and sets and gets a column name
    Dim MyModelSpace As AcadModelSpace
    Set MyModelSpace = ThisDrawing.modelSpace
    Dim pt(2) As Double
    Dim MyTable As AcadTable
    Dim cName As String
    Set MyTable = MyModelSpace.AddTable(pt, 5, 5, 10, 30)
    
    Call MyTable.SetCellDataType(2, 2, acLong, acUnitDistance)
    Call MyTable.SetCellFormat(1, 3, "testFormat")
    Call MyTable.SetCellState(4, 3, acCellStateContentLocked)
    Call MyTable.SetCellValue(1, 4, 5)
    
    MsgBox MyTable.GetCellValue(1, 4) & " is the test cell's value "
    ZoomExtents
    
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_CellManipulation()
    ;; This example adds a table in model space and sets and gets a column name
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    (setq pt (vlax-3d-point 0 0 0))
  
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq MyTable (vla-AddTable modelSpace pt 5 5 10 30))
    
    (vla-SetCellDataType MyTable 2 2 acLong acUnitDistance)
    (vla-SetCellFormat MyTable 1 3 "testFormat")
    (vla-SetCellState MyTable 4 3 acCellStateContentLocked)
    (vla-SetCellValue MyTable 1 4 5)
    
    (alert (strcat (itoa (vlax-variant-value (vla-GetCellValue MyTable 1 4))) " is the test cell's value."))
    (vla-ZoomExtents acadObj)
)