Andrea,
The problem might be that you have objects in your table that doesn't have
a brush "attribute", fore instance
polylines or points.
Start by selecting the records with a polygon before you compare the brush
text with the brush on the object:
Select * from TableName
where Str$(ObjectInfo(obj, 1)) = "7"
into ONLY__REGION__OBJS NoSelect
Select * from ONLY__REGION__OBJS
Where Str$(ObjectInfo(obj, 3)) = "Brush (2,16711680,16777215)"
Into Selection
And further more you might even want to check if you have records without
objects at all:
Select * from TableName
where Not Obj
into REC__WITHOUT__OBJS NoSelect
HTH,
Peter
------------------------------------------------------------------------------------------------
Peter Horsb�ll M�ller, GIS Udviklingskonsulent / GIS-Developer
Kampsax A/S - GIS Software & Solutions
Rugaardsvej 55, 5000 Odense, DK
tel: +45 6313 5013, dir:+45 6313 5008, fax: +45 6313 5090
mailto:pem@;kampsax.dk
www.kampsax-gis.dk and www.kampsax.dk
Authorized MapInfo Partner & Distributor in Denmark and Norway.
------------------------------------------------------------------------------------------------
Klik ind p� http://www.kortal.dk og se det hele lidt fra oven!
Check http://www.kortal.dk and have a look at Denmark from above!
----- Videresendt af Peter M�ller/Kampsax - 18-10-2002 09:16 -----
Andrea Perego
<aperego@iamg Til: [EMAIL PROTECTED]
old.com> cc:
Vedr.: MI-L MB Select polygon by brush
17-10-2002
22:26
Hi,
I am sure this is a simply MB question, but I am just getting my feet wet.
I want to select polygons in a table by the fill pattern and colour. I
have
the code:
Select * from TableName where
Str$(ObjectInfo(TableName.obj,3))="Brush(2,16711680,16777215)" into
Selection
but it gives me an error:
ObjectInfo: argument 2 out of range
I got the Brush "numbers" by creating a legend and reading the code that
was in
the *.wor file.
Does anyone know what this error means and what I have to do to fix it?
I have looked in the MB Reference book and the archives but between the two
I
am still stuck.
Many Thanks,
Andrea
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 3637