problem with ExportFeatureLinesAsCogoPoints(String, CorridorPointCodeSelector) method

problem with ExportFeatureLinesAsCogoPoints(String, CorridorPointCodeSelector) method

Mohamed_Almaz
Contributor Contributor
253 Views
2 Replies
Message 1 of 3

problem with ExportFeatureLinesAsCogoPoints(String, CorridorPointCodeSelector) method

Mohamed_Almaz
Contributor
Contributor

i want to use this method 

but i can not modify the construct (CorridorPointCodeSelector) with linq

for example this failed 

int counter = 1;

foreach (Corridor x in corridors)
{
CorridorPointCodeSelector selector = new CorridorPointCodeSelector(x);

CorridorPointCodeSelector selector1 = selector.Where(c=>c.CodeName =="ETW") as CorridorPointCodeSelector;


x.ExportFeatureLinesAsCogoPoints("POINT" + counter.ToString(), selector1 );

counter++;

}

 

0 Likes
Accepted solutions (1)
254 Views
2 Replies
Replies (2)
Message 2 of 3

Jeff_M
Consultant
Consultant
Accepted solution

This looks like what you are looking to do (no LINQ, but compact):

                CorridorPointCodeSelector selector = new CorridorPointCodeSelector(x);
                selector.UnSelectAll();
                selector["ETW"].Selected = true;
                x.ExportFeatureLinesAsCogoPoints("POINT" + counter.ToString(), selector);
Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 3 of 3

Mohamed_Almaz
Contributor
Contributor

thank you jeff 

a real hero as usual 

0 Likes