MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Naming Shapes

This is a discussion on Naming Shapes within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have a similar problem to this post . However the solution it to identify the shapes using their name, ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-17-2004
Junior Member
White Belt
 
Join Date: Jul 2004
Posts: 8
Naming Shapes

I have a similar problem to this post. However the solution it to identify the shapes using their name, unfortunately I can't figure out how to name a shape from within MapPoint. Can anyone shed some light?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 08-17-2004
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Here is a sample for you that might help. Note that shapes like geoLine, geoFreeform and geoTextBox do not have a name property.

Code:
Dim objmap As MapPointCtl.Map
Set objmap = MappointControl1.ActiveMap
    
Dim objShapes As MapPointCtl.Shapes
Dim objshape As MapPointCtl.Shape
Set objShapes = objmap.Shapes

Set objshape = objShapes.AddShape(geoShapeRadius, objmap.FindResults("Denver, CO").Item(1), 500, 500)
objshape.Name = "MyShape"
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 08-19-2004
Junior Member
White Belt
 
Join Date: Jul 2004
Posts: 8
I've had to determin the zone based on it's type, colour and width, which is a pain as it's not very generic. Although you state geoFreeform doesn't have a name property mappoint seems happy to set and return it.
Code:
    Dim Shape As MapPoint.Shape
    For Each Shape In mpc.ActiveMap.Shapes
        Select Case GetItemType(Shape)
            Case "geoFreeform"
                ' Set freeforms based on fill colour.
                If Shape.Fill.ForeColor = 10092543 Then Shape.Name = "Zone A"
                If Shape.Fill.ForeColor = 1 Then Shape.Name = "Zone E"
            Case "Circle based on a radius"
                ' Set radii based on width.
                If Shape.Width > 4 And Shape.Width < 5 Then Shape.Name = "Zone B"
                If Shape.Width > 8 And Shape.Width < 9 Then Shape.Name = "Zone C"
                If Shape.Width > 12 And Shape.Width < 13 Then Shape.Name = "Zone D"
        End Select
    Next
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
naming, shapes


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Pushpins from shapes glennuser MapPoint 2006/2009 Discussion 12 03-29-2004 08:36 AM
Shapes behind roads? Anonymous MapPoint 2006/2009 Discussion 0 08-27-2003 10:35 AM
Using Shapes as Territories Anonymous MapPoint 2006/2009 Discussion 0 08-01-2003 10:14 AM
Shapes and Queries Anonymous MapPoint 2006/2009 Discussion 1 06-09-2003 06:20 PM
Transparent shapes Anonymous MapPoint 2006/2009 Discussion 2 06-01-2003 01:59 PM


All times are GMT -5. The time now is 04:58 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54