The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



DataTag


Unit:SDL_rot3d
Class:TRot3D
Declaration:property DataTag: longint;

The property DataTag contains an integer value which can be set by the user according to his or her needs. The value of the DataTag is stored along with other information much in the same way as the color of an element. The tag of an individual element can be retrieved by the method GetItemParams.

Please note the difference between the Tag and the DataTag property. While the Tag property is available once per component, the DataTag property is a tag which is individually assigned to each graphics element.

The DataTag can be especially useful to relate any graphics elements to external information. The following code shows how to store a serial number along with each element drawn:

 
.... 
for i:=1 to 200 do 
  begin 
  Rot3D1.DataTag := i; 
  Rot3D1.MarkAt (x,y,z,10); 
  end; 
....

Each of the 200 hundred marks has now its own serial number.


Last Update: 2012-Oct-20