Function ImportCoordSysFromStrings(systemString As String, datumString As String, unitString As String) As ICoordSys
function ImportCoordSysFromStrings(const systemString: WideString; const datumString: WideString; const unitString: WideString): ICoordSys;
The ImportCoordSysFromStrings method produces an ICoordSys that matches the specified keys. The keys are assumed to be the keys used to identify the coordinate system in GeoCalc v5.x. The system key indicates the type of the coordinate system and, if applicable, the Projection used by the system. The datum key indicates the HorizontalDatum used in the coordinate system. The units key indicates the measurement units used to express the location of ICoordPoints within the ICoordSys. If the specified keys identify an ICoordSys, it will be returned by this method.
Sub DataSource_ImportCoordSysFromStrings(data As DataSource)
Dim cs As ICoordSys
Dim systemKey As String
Dim datumKey As String
Dim unitsKey As String
systemKey = "UTM-19N"
datumKey = "WGS84"
unitsKey = "METERS"
Set cs = data.ImportCoordSysFromStrings(systemKey, datumKey, unitsKey)
If cs Is Nothing Then
MsgBox ("Unable to import CoordSys")
End If
End Sub
procedure DataSource_ImportCoordSysFromStrings(data : DataSource);
var
cs : ICoordSys;
systemKey : WideString;
datumKey : WideString;
unitsKey : WideString;
begin
systemKey := 'UTM-19N';
datumKey := 'WGS84';
unitsKey := 'METERS';
cs := data.ImportCoordSysFromStrings(systemKey, datumKey, unitsKey);
if cs = nil then
begin
ShowMessage('Unable to import CoordSys');
end;
end;