com.esri.arcgis.carto
Interface IElementProperties

All Superinterfaces:
Serializable
All Known Implementing Classes:
BmpPictureElement, CircleElement, DataGraphTElement, EllipseElement, EmfPictureElement, FrameElement, GifPictureElement, GroupElement, ImgPictureElement, InkGraphic, Jp2PictureElement, JpgPictureElement, LineElement, MapFrame, MapSurroundFrame, MarkerElement, MultiPatchElement, OleFrame, ParagraphTextElement, PictureElement, PMFTitleTextElement, PngPictureElement, PolygonElement, RectangleElement, SidPictureElement, Text3DElement, TextElement, TifPictureElement

public interface IElementProperties
extends Serializable

Provides access to members that control the Element Properties.

Superseded By

IElementProperties3

Remarks

Use the IElementProperties interface when you need to tag your graphic elements so that you can identify them later. An example of where this would be useful is when you add graphics to a layout, and know that you would want to delete them later, and need to distinguish them from the ones already present in the layout.

If you want to tag your element with a text string, you can simply use the Name or the Type property. If you want to associate another datatype with it, you can use the CustomProperty property which takes a Variant.

When To Use

IElementProperties is a generic interface implemented by all GraphicElement objects (TextElement, PolygonElement, LineElement, etc.). The interface is used to assign custom properties to an element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
IElement

Method Summary
 Object getCustomProperty()
          Custom property.
 String getName()
          Name of the element.
 String getType()
          Type of the element.
 boolean isAutoTransform()
          Indicates if transform is applied to symbols and other parts of element.
 void setAutoTransform(boolean autoTransform)
          Indicates if transform is applied to symbols and other parts of element.
 void setCustomProperty(Object customProperty)
          Custom property.
 void setName(String name)
          Name of the element.
 void setType(String name)
          Type of the element.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Name of the element.

Remarks

The Name property is used to store a name associated with the custom property assigned to the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

void setName(String name)
             throws IOException,
                    AutomationException
Name of the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

String getType()
               throws IOException,
                      AutomationException
Type of the element.

Remarks

Type is a string used to specify the type of property that has been assigned to the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setType

void setType(String name)
             throws IOException,
                    AutomationException
Type of the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAutoTransform

boolean isAutoTransform()
                        throws IOException,
                               AutomationException
Indicates if transform is applied to symbols and other parts of element. False = only apply transform to geometry.

Remarks

AutoTransform is a boolean values that indicates whether internal setings should be transformed along with the elements's geometry, when a transform is applied via ITransform2D. For instance, if I have a point element and I rotate it around a central location (the anchor point of the rotation being different from the point element iself), then the AutoTransform property is used to determine whether the orientation of the symbol associated to the element should also be rotated by the same amount.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The autoTransform
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAutoTransform

void setAutoTransform(boolean autoTransform)
                      throws IOException,
                             AutomationException
Indicates if transform is applied to symbols and other parts of element. False = only apply transform to geometry.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
autoTransform - The autoTransform (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomProperty

Object getCustomProperty()
                         throws IOException,
                                AutomationException
Custom property.

Remarks

CustomProperty is a place for developers to attach custom objects to an element. Previous versions of the software required that the specified variant be of type VT_UNKNOWN, i.e. a reference to an object, but that requirement has since been removed. Now, the CustomProperty can also be a simple type like an integer, double, boolean (VARIANT_BOOL) or a string (BSTR).

When this property is an object reference, the object must implement a persistence interface, so if you write a custom object it must implement IPersistStream or IPersistVariant. As an alternative to writing a custom object, you can use a PropertySet or XMLPropertySet, since they both already implement IPersistStream.

CustomProperty is never used by the core ArcObjects for its own elements, but the core software will expect to find an IPersistStream or IPersistVariant interface when the this property is an object reference, and it is part of an element being retrieved from or stored in an .mxd file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCustomProperty

void setCustomProperty(Object customProperty)
                       throws IOException,
                              AutomationException
Custom property.

Remarks

CustomProperty is a place for developers to attach custom objects to an element. Previous versions of the software required that the specified variant be of type VT_UNKNOWN, i.e. a reference to an object, but that requirement has since been removed. Now, the CustomProperty can also be a simple type like an integer, double, boolean (VARIANT_BOOL) or a string (BSTR).

When this property is an object reference, the object must implement a persistence interface, so if you write a custom object it must implement IPersistStream or IPersistVariant. As an alternative to writing a custom object, you can use a PropertySet or XMLPropertySet, since they both already implement IPersistStream.

CustomProperty is never used by the core ArcObjects for its own elements, but the core software will expect to find an IPersistStream or IPersistVariant interface when the this property is an object reference, and it is part of an element being retrieved from or stored in an .mxd file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
customProperty - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.