what about just returning the coordinates of the object rather than the
object itself, then evaluating those coordinates to determine whether they
lie within a specified zone?
 
i can't say much about your "specified date" or "certain fields" as i don't
know where this data is coming from, ie whether it's on a form somewhere or
PART of the selected object itself.
 
so, getting the coordinates (i werk in VBA, but the code should be pretty
close)
 
#############################
dim X as Float
dim Y as Float
dim NumSel as Long
 
NumSel = selectioninfo(3)
 
If NumSel > 1 Then
    msgBox "Please select only ONE object."
ElseIf NumSel < 1 Then
    msgBox "Please select an object."
ElseIf NumSel = 1 Then
    X = objectgeography(selection.object,1)
    Y = objectgeography(selection.object,2)
End If
##############################
 
then select the object which has the coordinates within it (this is the best
i can come up with off the top of my head, there's probably a better way)
 
##############################
 
Select * from YourMap Where CreateCircle( X, Y, .001) Within YourMap.obj
 
##############################
 
i used ".001" as the diameter of the circle just so it's a tiny area and
should only be within a single region.
 
and this is all assuming your regions cover the entire area and do not
overlap, such as suburbs.  if this is not true, then you'll have to make a
FindNearest function or something (not too hard).
 
see if this gives you some ideas.
 
ash
 
-----Original Message-----
From: Doug Pease [mailto:[EMAIL PROTECTED]
Sent: Thursday, 30 October 2003 10:16 AM
To: [EMAIL PROTECTED]
Subject: MI-L run command error problem ... cont'd



Thanks again to all who responded to my run command error problem. Lars'
response was a great help in understanding why the problem occurs. Despite
all of the responses I am still unable to get beyond this problem in my
application. 

 

If I explain what I'm trying to do perhaps someone might suggest a way to
achieve the results with out having to use an object variable in a query
expression: 

*         Using a tool button the user picks a point on the map

*         If the chosen point is within a specific map object and a start
date matches a specified date then do something else

*         If the chosen point is within a specific map object and a end date
matches a specified date then do something else

*         If the chosen point is within a specific map object and a certain
fields match a specified criteria then do something else

*         etc

 

Thanks again

 

 

 

Doug Pease

GIS Officer

Livingstone Shire Council

PO Box 600

Yeppoon 4703

Qld Australia

 

Ph    07 49399957

Fax   07 49393290

 

Reply via email to