Quote:
|
Originally Posted by John Meyer Ok, Here is an example that will create a drivetimezone (a shape) and report how many pushpins are in it. (Put a pushpin in Tampa, FL) You should be able to adapt this to work with other shapes as needed.... My MapPoint Control is named MapPointCtl so you may need to edit the code or change the name of your control.... Let me know if you have success with this sample. Code: Dim objmap As MapPointCtl.Map
Dim objDataSet As MapPointCtl.DataSet
Dim objRecords As MapPointCtl.Recordset
Dim objshape As MapPointCtl.Shape
Dim lngCount As Long
Dim objloc1 As MapPointCtl.Location
Dim aDriveTimeZone As MapPointCtl.Shape
Set objmap = MappointControl1.ActiveMap
Set objloc1 = objmap.FindResults("Tampa, FL").Item(1)
Set objshape = objmap.Shapes.AddDrivetimeZone(objloc1, 20 * geoOneMinute)
objshape.Select
For Each objDataSet In objmap.DataSets
Set objRecords = objDataSet.QueryShape(objshape)
objRecords.MoveFirst
Do While Not objRecords.EOF
lngCount = lngCount + 1
objRecords.MoveNext
Loop
Next
MsgBox "Number of records in shape: " & lngCount
|
hi,
i tried the exact thing above and it doesnt return any records. i've been trying this for quite a while now, but numerous attempts have only led to frustration. it doesnt give an errormessage or something, but the above example doesnt create any datasets.
is a dataset supposed to be created automatically when a queryshape is executed? is there some setting for this?
would be thankfull for any replies..