<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY style="FONT: 10pt Courier New; COLOR: #000000" leftMargin=5 topMargin=5>
<DIV dir=ltr align=left><SPAN class=417260817-09112006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=417260817-09112006>This name will vary with
each dataset that you use this function for.</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=417260817-09112006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=417260817-09112006>It may be more robust to
take a generic approach, inspecting the class definition -- GetClassDefinition()
-- to determine the identity property -- GetIdentityProperties(), IndexOf(),
GetName(). I don't think that MapGuide supports multiple identity columns
yet (could be wrong) so you should be safe just getting the definition of the
first one.</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=417260817-09112006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=417260817-09112006>You can find how to work
with these calls here:</SPAN></DIV>
<DIV><A
href="https://mapguide.osgeo.org/nonav/docs/webapi/d6/ddc/class_mg_feature_reader.html">https://mapguide.osgeo.org/nonav/docs/webapi/d6/ddc/class_mg_feature_reader.html</A></DIV>
<DIV> </DIV>
<DIV><SPAN class=417260817-09112006>The only one that is difficult to find is
GetName(), which is a method of the MgPropertyDefinition's parent class,
MgProperty.</SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=417260817-09112006>Jaosn</SPAN></DIV>
<DIV><BR> </DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma><B>From:</B> Markus Roth<SPAN class=417260817-09112006><FONT
face="Courier New"> </FONT></SPAN></FONT></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma><B>Sent:</B> Thursday, November 09, 2006 00:21<BR><B>To:</B>
users@mapguide.osgeo.org<BR><B>Subject:</B> Re-2: [mapguide-users] Selection and
Zoom Problem<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT: 10pt Courier New; COLOR: #000000">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman"
size=3>Thanks Andy!</FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">I had
already tried this, without success.<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">But I
found the error:<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><FONT size=3><FONT face="Times New Roman">When
I change “Key” to “Autogenerated_SDF_ID”, it
works:<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes">Select</SPAN><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes">
<SPAN style="COLOR: blue">Case</SPAN> features.GetPropertyType(<SPAN
style="COLOR: maroon">"Autogenerated_SDF_ID"</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Case</SPAN>
MgPropertyType.Int32<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>Selection.AddFeatureIdInt32(layer, featureClassName,
features.GetInt32(<SPAN
style="COLOR: maroon">"Autogenerated_SDF_ID"</SPAN>))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">Case</SPAN>
MgPropertyType.String<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>Selection.AddFeatureIdString(layer, featureClassName,
features.GetString(<SPAN
style="COLOR: maroon">"Autogenerated_SDF_ID"</SPAN>))<o:p></o:p></SPAN></P>
<P class=MsoNormal
style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">End</SPAN> <SPAN
style="COLOR: blue">Select<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-GB; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN></SPAN><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">End</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN
style="COLOR: blue">If</SPAN></SPAN><SPAN lang=EN-GB
style="mso-ansi-language: EN-GB"><o:p></o:p></SPAN></P></DIV>
<DIV style="FONT: 10pt Courier New; COLOR: #000000"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"></SPAN> </DIV></BODY></HTML>