Previous Document Next Document
Shape.ObjectData

Property ObjectData As DataItems

Member of Shape

The ObjectData property returns a collection of DataItems, which represents object data associated with a shape.

Object data can also be manipulated through the Object Data Manager in CorelDRAW.

The ObjectData property returns a read-only value.

The following code example creates a new data field and sets it to the area of a shape for each shape encountered on the active page:

Sub Test() 
 Dim s As Shape, x As Double, y As Double 
 ActiveDocument.DataFields.Add "Area", "0.000" 
 For Each s In ActivePage.Shapes 
  s.GetSize x, y 
  s.ObjectData("Area").Value = x * y 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.