Skip To Content

esri_coordsys_DatumTransformation_remove (AutoLISP)

The esri_coordsys_DatumTransformation_remove function removes a datum transformation from the current drawing. Datum transformations are unique between the from and to coordinate systems in a drawing. These unique datum transformation definitions are identified using the FromCS and ToCS coordinate systems when setting and removing them. Use the esri_coordsys_DatumTransformations function to get a list of datum transformations stored in the drawing.

Syntax

(esri_coordsys_DatumTransformation_remove FromCS ToCS)

Arguments

  • FromCS | string | required | A valid well-known ID (WKID) or well-known text (WKT) of the Esri coordinate system as a string.
  • ToCS | string | required | A valid well-known ID (WKID) or well-known text (WKT) of the Esri coordinate system as a string.
Note:

When creating WKT as an AutoLISP string argument, the string must contain the appropriate escape characters to include the necessary quotation marks in the text string. The following is an example:

Coordinate system

"PROJCS[\"NAD_1983_HARN_StatePlane_Florida_West_FIPS_0902_Feet\",GEOGCS[\"GCS_North_American_1983_HARN\",DATUM[\"D_North_American_1983_HARN\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",656166.6666666665],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-82.0],PARAMETER[\"Scale_Factor\",0.9999411764705882],PARAMETER[\"Latitude_Of_Origin\",24.33333333333333],UNIT[\"Foot_US\",0.3048006096012192],AUTHORITY[\"EPSG\",2882]]"

Example usage 1

Remove the existing datum transformation from the current drawing between the specified from and to coordinate systems.

(esri_coordsys_DatumTransformation_remove "2882" "3857")

Result example usage 1

The existing datum transformation definition is removed and the function returns a list that contains true (T).

(T)

Example usage 2

Remove the existing datum transformation from the current drawing.

(esri_coordsys_DatumTransformation_remove "6543" "3857")

Result example usage 2

The existing datum transformation definition is not removed due to an existing web feature layer in the current drawing. An error message is returned.

(nil ("Error" . "This document contains existing web feature layers. Datum transformations cannot be modified when web feature layers present."))

Return values

The following are the possible return values:

  • If successful, the existing datum transformation definition is removed and the function returns a list that contains true (T).

  • If failed, it returns a list with the first value of nil; then, an associated list is returned containing the key value "Error" and an associated error message as a string: (nil ("Error" . "<message>")).

Failed return values

A failed return value can occur for any of the following reasons:

  • (nil ("Error" . "Failed"))

    The WKID or WKT provided is invalid.

  • (nil ("Error" . "Missing required argument."))

    One or more of the required arguments was not provided.

  • (nil ("Error" . "This document contains existing web feature layers. Datum transformations cannot be modified when web feature layers present."))

    Datum transformations cannot be removed or modified when the document contains existing web feature layers.