Skip To Content

esri_coordsys_DatumTransformations_remove (AutoLISP)

This 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_DatumTransformations_remove FromCS ToCS)

Arguments

  • FromCS | string | required | Valid WKID (well-known coordinate system identification number) or WKT of the Esri coordinate system as a string.
  • ToCS | string | required | Valid WKID (well-known coordinate system identification number) or WKT of the Esri coordinate system as a string.

Note:

When creating well-known text (WKT) as an AutoLISP string argument, the string must contain the appropriate escape characters to include the necessary quotation marks within 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

Attempts to remove the existing datum transformation in the current drawing between the specified from and to coordinate systems.

(esri_coordsys_datumtransformations_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

Attempts to remove the existing datum transformation in the current drawing.

(esri_coordsys_datumtransformations_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 existing datum transformation definition is removed and the function returns a list that contains true (T).

  • If the function fails, a list with the first value of nil is returned followed by an associated list 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 supplied.

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

    The document contains an existing web feature layer.