Community of VE/MapPoint Users and Developers
This is a discussion on Selecting Shape Based on Name within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have some code where I want to select a shape based on its name Dim objShape As MapPoint.Shape Dim ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Selecting Shape Based on Name Dim objShape As MapPoint.Shape Dim strName As String strName = "NA123456" objShape = objMap.Shapes.Item(strName) Basically something like that, however everytime I run it I get the rather irratating Mappoint has encountered a problem and needs to close window. If I do objShape = objMap.Shapes.Item(1) It works fine The help files clearly state that you can select a shape based on its name, and all the shapes have been named properly. Has anyone else encountered a similar problem or has any ideas as to what i'm doing wrong |
| ||||
|
Not all shapes have a name property (like a geoline for example). Here is a basic sample that might help. Create a shape (Rectangle,Oval or Circle) and name it "MyShape" Code: Dim objshape As MapPoint.Shape
For Each objshape In MappointControl1.ActiveMap.Shapes
Select Case objshape.Type
Case 1 ' An AutoShapeType (Rectangle,Oval or Circle)
If objshape.Name = "MyShape" Then
MsgBox "Do Something"
End If
End Select
Next
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
![]() |
| Tags |
| based, selecting, shape |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does an object reside in my Shape or Shape boundaries? | hotrdd | MapPoint 2006/2009 Discussion | 1 | 08-04-2005 09:51 PM |
| Selecting and deleting the push pin | Anonymous | MapPoint 2006/2009 Discussion | 1 | 02-10-2005 07:01 AM |
| Selecting cities in drivetime | Anonymous | MapPoint 2006/2009 Discussion | 5 | 02-02-2005 04:21 PM |
| Selecting a prviously drawn shape | CSG | MapPoint 2006/2009 Discussion | 1 | 03-24-2004 10:08 AM |
| Selecting pushpins within a shape | Anonymous | MapPoint 2006/2009 Discussion | 1 | 09-26-2002 08:11 AM |
Flights from East Midlands Airport
Book low cost airline flights from East Midlands Airport. Holiday Hypermarket let you search for great deals from top tour operators.
Turkey Holidays
Find great Turkey Holidays with Travel Counsellors. A personal Travel Counsellor can help you plan the perfect holiday to Turkey.
Holiday Cuba
Most of all though, you will remember your Holiday in Cuba for the people. Naturally open and friendly with the warmest welcome in the Caribbean. Book at dealchecker.co.uk today.
All Inclusive Maldives
Visit The Holiday Place.co.uk for great deals on all inclusive holidays to the Maldives. Book a holiday to the outstandingly beautiful Maldives.
Cheap Balearics Holidays
Cheap Balearics holidays are available if you know when to book and who to book with. The Balearics have many fascinating places to visit all year round. The partying never stops.
Bargain family holidays
We can help you find family holidays at bargain prices when you check out the options at Travel.co.uk
Holidays to Sharm el Sheikh
Want to visit the Sinai peninsula? We can help. Info on holidays to Sharm el Sheikh, only at On The Beach.