Community of VE/MapPoint Users and Developers
This is a discussion on find records inside existing shape with VBA within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I want to use the queryshape function on an existing shape of the map. The map will have several shapes ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| find records inside existing shape with VBA Last edited by chas; 08-25-2006 at 02:51 PM. |
| |||
|
Hi, I'm not sure I understeand your question. QueryShape returns records that are _in_ the shape. Is that what you want ? If not, can you repeat your question in simple English? (I'm not English spoken) because now your question it is a little confusing..
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet Last edited by Wilfried; 08-25-2006 at 03:56 PM. |
| |||
| Ok I'll try again
I have an exisiting map with several ploygons around several dataset records in each ploygon. How can I access each ploygon(shape) and return the records that are in it. The queryshape function will do it but it requires locations of shape edges/vertices? i think. I have tried programicly naming the shapes . . no luck. and several other things. |
| |||
|
Hi, This shows the pushpins in a shape: Code: Loc = MP.ActiveMap.GetLocation(Lat, Lon, Alt);
Shape s = MP.ActiveMap.Shapes.AddShape(GeoAutoShapeType.geoShapeRadius, Loc, 100, 100);
s.Line.Weight = 0;
s.Select();
object o = 1;
Recordset rs = MP.ActiveMap.DataSets.get_Item(ref o).QueryShape(s);
rs.MoveFirst();
while (!rs.EOF) {
// here we have all pushpins
rs.MoveNext();
}
Code: MapPoint.DataSet InCircle = MP.ActiveMap.DataSets.AddPushpinSet("In circle");
rs.MoveFirst();
while (!rs.EOF) {
rs.Pushpin.MoveTo(InCircle);
rs.MoveNext();
}
o = "In circle";
rs = MP.ActiveMap.DataSets.get_Item(ref o).QueryShape(s);
rs.MoveFirst();
while (!rs.EOF) {
// here we have all pushpins
rs.MoveNext();
}
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| ||||
|
You should be able to iterate through the Shapes collection? Wilfried adds a new shape to this collection so he knows which one he is working with. Iterate through the shapes, testing each against the pin(s). Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009 |
![]() |
| Tags |
| existing, find, inside, records, shape, vba |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is a location inside a Route? | giaarcix | MapPoint 2006/2009 Discussion | 2 | 08-01-2006 01:36 PM |
| Does an object reside in my Shape or Shape boundaries? | hotrdd | MapPoint 2006/2009 Discussion | 1 | 08-04-2005 09:51 PM |
| How do you add records to an existing dataset? | stephenmillington | MapPoint 2006/2009 Discussion | 0 | 09-07-2004 04:24 AM |
| Display Records that Mappoint Can't find | Anonymous | MapPoint 2006/2009 Discussion | 2 | 01-05-2004 10:20 AM |
| Exporting places inside a selection to Excel | Pat Lee | MapPoint 2006/2009 Discussion | 2 | 06-09-2003 09:10 AM |
Val d'Isere
For a ski holiday destination renowned for combining great skiing with a vibrant nightlife, book a holiday to Val d'Isere. Holiday Hypermarket brings you the latest great deals.
City Breaks
Book a city break with Travel Counsellors. A personal travel advisor will help you make the most of your city break.
Holidays Thailand
Holidays in Thailand are hugely diverse with wonderful luxury resorts and beaches but also some lovely forested mountains with interesting hill tribes. See dealchecker.co.uk.
Holidays in Egypt
A holiday in Egypt will stimulate your mind, captivate your heart and spark your senses. Visit this exceptional country, book today!
Portugal
As well as providing some great weather Portugal has much to offer culturally. There are numerous museums, monuments and places of historical interest to explore. Despite the rich history there is a buzzing nightlife and great shopping too.
Family activity holidays
Family holidays can be full of fun activity. Check out your options at Travel.co.uk
Holidays in Goa
Want to know more about Indian culture? Visit On The Beach for information on holidays in Goa.