Rotate Geometry without Editing-ITrasnform2D Interface

If you would like rotate/move set of features to certain degree/distance, you can easily make use of ITransform2D Interface(esriGeometry).  Methods in this interface, helps to rotate/move/transform the elements and geometries .

ITransform2D is a generic interface implemented by most elements and geometries (i.e., CircleElement, FrameElement, Point, Line, Polygon, etc.).  Use this interface when you want to update the position of the element or geometry through some type of Euclidan 2D transformation opertion (move, rotate, scale, or transform).

Once you did the necessary operations, you can store the geometry using IFeature:Store method. There is difference between using ‘Store’ method within edit session and outside. Calling Store within an edit session caches the edit until the edit session is ended. If a save is done, then the cached edits are written to the datasource. If no save is done, the cached edits are discarded. If you call Store outside of an edit session,  then the edit is committed immediately to the database. There is no way to rollback or discarded the changes. Hence it would be advised to use this with proper care. If you want to temporarily rotate/move ,then suits you well.

ITransform2D Interface Tutorial VBA Read the ‘Note’ carefully before using this sample.

Interface available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: