|
Hi
I have what I believe is an object in a layer - I think it's a line - if I query it in the Maspbasic window in MI with "select objectinfo (obj,1) from table_name" then look at the selection table I see object type 3 ie a line.
If I use the following line in some Mapbasic code which interrogates the same layer:
If ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 4 or ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 7 then
Then I get the following error when it gets to the object that I believe is a “line”:
(Blah.mb:123)ObjectInfo: argument 2 out of range
If I write what is happening out to a text file ie Print #1, (temptablearray(i) +" "+ colname+" " +colAlias + " "+ ObjectInfo(ColAlias, OBJ_INFO_TYPE)) where colAlias is the Alias of the column name: ColAlias = Temptabname & "." & Colname
I get the following:
Query134 Query134 object Polyline 4
The top line above is the “line” that I think is causing the problem, the second line above shows a result that works.
Is this “line” an object or not and can I do anything to avoid the out of range error?
I hope this all makes sense!!
Nicki
Nicki
Cozens Tel:
0116 265 7420
_______________________________________________________________________ Leicestershire County Council - rated a 'four-star' council by the Audit Commission _______________________________________________________________________
This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received.
Incoming and outgoing e-mail messages are routinely monitored for compliance with Leicestershire County Council's policy on the use of electronic communications. The contents of e-mails may have to be disclosed to a request under the Data Protection Act 1998 and the Freedom of Information Act 2000.
The views expressed by the author may not necessarily reflect the views or policies of the Leicestershire County Council.
Attachments to e-mail messages may contain viruses that may damage your system. Whilst Leicestershire County Council has taken every reasonable precaution to minimise this risk, we cannot accept any liability for any damage which you sustain as a result of these factors. You are advised to carry out your own virus checks before opening any attachment.
|
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
