Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

Creating New Dataset

This is a discussion on Creating New Dataset within the MapPoint Desktop Discussion forums, part of the Map Forums category; how can you create new dataset from an existing one? Thanks in advance...

  1. #1
    Yazzy is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    25

    Creating New Dataset

    how can you create new dataset from an existing one?

    Thanks in advance

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Code:
                MapPoint.DataSet newSet= MP.ActiveMap.DataSets.AddPushpinSet("new set");
                rs.MoveFirst();
                while (!rs.EOF) {
                    rs.Pushpin.MoveTo(newSet);
                    rs.MoveNext();
                }

  3. #3
    Yazzy is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    25

    Errors in creating new dataset

    Hi, I am getting an error 'Object does not support this property or method' when I try to creat a new dataset. I am using DisplayDataMap to import data. Where am I going wrong?

    Dim objmap As MapPointCtl.Map
    Dim objLoc As MapPointCtl.location
    Dim objpushpin As MapPointCtl.Pushpin
    Dim objdataset As MapPointCtl.DataSet
    Dim objRS As MapPointCtl.Recordset
    Dim objPin As MapPoint.Pushpin

    Dim objSymbol As MapPoint.Symbol
    Dim objPsymbol As MapPointCtl.Symbol
    Dim objRS1 As MapPointCtl.Recordset
    Dim objRS2 As MapPointCtl.Recordset
    Dim set1 As MapPoint.DataSet
    '////////////////////////////////////////////////////////////////////////////

    Set objdataset = objmap.DataSets(1)

    Set objRS = objdataset.QueryAllRecords '???
    Set objRS1 = objRS
    Set objRS2 = objRS


    Set set1 = objmap.DataSets.AddPushpinSet("Test")

    Do While Not objRS2.EOF
    location = objRS.Fields(1)
    Set objLoc = objmap.FindResults(location).Item(1) 'Works
    Set objPin = objmap.FindPushpin(objRS2.Fields(3))
    Set objPin = objmap.AddPushpin(objLoc)
    objPin.MoveTo (set1) 'THIS IS WHERE I GET THE ERROR 'Object does not support this method or propertry'

    I will be very grateful if you are to help.

    Thanks in advance

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    I never used DisplayDatamap. Maybe the problem is in there ? Try first something simple and see if this works like this example:

    Code:
                Map map = MP.ActiveMap;
                Location loc = map.GetLocation(50, 4, 1);
                Pushpin pp = map.AddPushpin(loc, "Wilfried");
                MapPoint.DataSet newSet = map.DataSets.AddPushpinSet("New set");
                pp.MoveTo(newSet);
    Is in C# but you can easely convert it to VB and try it.

  5. #5
    Mohamed is offline Member Green Belt
    Join Date
    Mar 2005
    Posts
    97
    Hi,



    objPin.MoveTo (set1) 'THIS IS WHERE I GET THE ERROR 'Object does not support this method or propertry'
    Try this and replace the line where you have the error:

    Code:
    objPin.MoveTo objmap.DataSets.Item("Test")

    I didn't the test, but I think this should be working! I hope.

    Bye

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Creating an Add-in in VS .net
    By Anonymous in forum MP2K Magazine Articles
    Replies: 2
    Last Post: 02-18-2005, 08:21 PM
  2. need help in creating map of a city in vb
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-29-2004, 01:19 PM
  3. Creating a tooltip on a map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 01-20-2004, 08:09 AM
  4. Creating a Route
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-01-2003, 10:44 AM
  5. Creating new maps
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-25-2002, 02:32 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 55 56 57 58 59 60 61 62 63 64 65 66