Object Hierarchy | Related C++ Class: GridData
This object represents a 2-Dimensional array of data. The word "Grid" refers to the visual presentation of 2-Dimensional data on a grid control (sometimes called a table or spreadsheet control). The word "Cell" refers to a single element of the array.
The dimensions of the array can be dynamically resized and many types of data can be stored as Cell data. The Columns and Rows can be labeled and it is possible to refer to the data by these label strings rather than by indices.
There are three main uses for the GridData object. The first is as the data for a siGridControl on a custom object, see CustomProperty.AddGridParameter. In this case the user can view and edit the data and the data is saved inside the scene along with the CustomProperty. This can be an effective way to store lists, vectors or even arrays of vectors related to a plug-in. Some aspects of the visual representation of the GridData object are set directly on the GridData object, for example GridData.SetColumnType, but most attributes are set inside the PPGLayout using PPGItem.SetAttribute. siPPGItemAttributes that apply to the siGridControl include siUIGridColumnWidths and siUIGridHideRowHeader.
A second possible use of the GridData object is to store hidden data that is intended for internal use by a plug-in. In this case it is still part of a CustomProperty but it is not exposed to the user, which is easily done by not including the GridData Parameter in the PPGLayout.
The third possible use of this object is as a temporary convenience object for dealing with 2-Dimensional Arrays. In particular some scripting languages like JScript do not support 2-Dimensional arrays in their built-in Array objects, so the GridData object provides a workaround. You can get a temporary GridData object by calling XSIFactory.CreateGridData.
• See GridData.1.js
• See GridData.2.js
Autodesk Softimage 2011