<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
        {font-family:"Century Gothic";
        panose-1:2 11 5 2 2 2 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h1
        {margin-top:5.0pt;
        margin-right:0in;
        margin-bottom:5.0pt;
        margin-left:0in;
        font-size:10.0pt;
        font-family:"Century Gothic";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Trebuchet MS";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Scott,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><br>
I think the approach you need to employ here is to use the layer collection
from your selection and loop through the layers checking for your layer of interest.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>If you need more
details, you can refer to this thread on the mapguide/nabble forum:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><a
href="http://www.nabble.com/Listing-Active-selected-feature-C--tf3045397s16610.html#a8502654">http://www.nabble.com/Listing-Active-selected-feature-C--tf3045397s16610.html#a8502654</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Hope this helps,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Greg<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Scott Hameister<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, January 26, 2007 8:44
PM<br>
<b><span style='font-weight:bold'>To:</span></b> 'MapGuide Users Mail List'<br>
<b><span style='font-weight:bold'>Subject:</span></b> [mapguide-users]
Filtering a selection</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I want to be able to filter a current
mapguide Selection just down to items on one or two specific layers of the
original selection set<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Example:
&nbsp;selection.FromXml(Session.Selection)&nbsp; &gt;&gt;&gt;&gt;&gt; Gives Me
Objects on the Parcel Layer, Water Pipes, And Sanitary Pipes Layer<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I would like a simple way to change my
Selection using the Server API to only Objects from this Selection on the Water
and Sanitary pipes Layer.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I tried doing
&nbsp;&nbsp;selection.GenerateFilter(layer, layerClassName)&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>But that doesn&#8217;t weed out my
selection but instead makes it bigger to include All the Pipes as well as the
original Parcels&#8230;.What am I missing<o:p></o:p></span></font></p>

</div>

</body>

</html>


<HTML><BODY><P><hr size=1></P><br>
<P><STRONG><br>
The substance of this message, including any attachments, may be<br>
confidential, legally<br>
privileged and/or exempt from disclosure pursuant to Massachusetts<br>
law. It is intended<br>
solely for the addressee. If you received this in error, please<br>
contact the sender and<br>
delete the material from any computer.<br>
</STRONG></P></BODY></HTML>