Nicholas,

You can select those rows that have objects before you do any other
processing and then just process those object rows.

A selection such as:

Select * From MyTable Where Obj Into ObjectRows

Would work.

You could even just select the lines:

Select * From MyTable Where Str$(obj) = "Line" Or Str$(obj) = "Polyline"
Into LineObjectRows

You can also use the ObjectInfo function:
ObjectInfo(objectexpression,OBJ_INFO_TYPE)
And look for a return of OBJ_TYPE_LINE or OBJ_TYPE_PLINE


Cheers

David Llewellyn 
 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, 17 July 2006 12:32 PM
To: [email protected]
Subject: [MI-L] Selecting records with objects


Hello List,

I have a mapinfo table in which not all records have spatial objects.

I am writing a MapBasic script in which I pick out those spatial objects
that are lines, and perform a buffer on the lines.

My problem is, the script fails every time I encounter a record that has
no
spatial object.

How can I get around this? Is there a mapbasic command that can detect
if a
record has a spatial object or not?

Regards,
Nick


************************************************************
Opinions contained in this e-mail do not necessarily reflect
the opinions of the Queensland Department of Main Roads,
Queensland Transport or Maritime Safety Queensland, or
endorsed organisations utilising the same infrastructure.
If you have received this electronic mail message in error,
please immediately notify the sender and delete the message
from your computer.
************************************************************
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

If this email has been received in error, please delete all copies and inform 
the National Native Title Tribunal by return email or telephone 1800 640 501.  
The Tribunal does not warrant that its email is virus free.  All emails sent to 
the Tribunal are filtered for viruses and inappropriate content. Thus your 
email may not reach the person to whom it is addressed. Seek confirmation of 
receipt of your email if you consider the email important.

_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to