Hi,

You must declare new object variable :
Dim XYobj As Object (if it doesn't work, try Dim XYobj As Alias)

  fetch rec i from tablename
        XYobj = tablename.obj
        startX = centroidX(XYobj)
        startY = centroidY(XYobj)

hope this helps you,

__________________________________________________

Sophie Coubes
Conseillere en Geomatique
GIS Consultant

KOREM Inc.   (http://www.korem.com)

GEOdiffusion de l'information
GEObroadcasting your information
__________________________________________________

680, Boul. Charest Est
Quebec  (Quebec)  CANADA  G1K 3J4
tel.: 418 647-1555
fax : 418 647-1666
Telephone sans frais : 1 888 440-1MAP
__________________________________________________

Meilleur nouveau partenaire Mapinfo 2000 - Amerique du Nord
Best Mapinfo New Partner 2000 - North America
__________________________________________________

Push'n'See! Developed by KOREM  http://www.pushnsee.com
The Web-Mapping Software for Entreprise-wide Depoyment


-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]De la part de Thompson,
Dara L. (RyTull)
Envoy� : 11 juillet, 2001 10:20
� : 'MapInfo-L'
Objet : MI-L MB - CentroidX argument



I am having trouble figuring out how to use a user-defined file name with
the CentroidX() and CentroidY() functions.

In the following code, tablename is the user-defined file (declared as a
global string variable).

        fetch rec i from tablename
           startX = centroidX(tablename.obj)
           startY = centroidY(tablename.obj)

The error message is: "Found [.] while searching for [ ) ]"

If the code is changed to:
        fetch rec i from tablename
           startX = centroidX(tablename)
           startY = centroidY(tablename)

It compiles, but does not run in MapInfo.  The following error occurs:
"CentroidX argument 1 has invalid type"

What am I missing?  There must be a way to do this.

        TIA,
        Dara Thompson
        Senior Analyst


--- Legal Disclaimer: The information contained in this communication may be
confidential, is intended only for the use of the recipient named above, and
may be legally privileged.  If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication, or any of its contents, is
strictly prohibited.  If you have received this communication in error,
please re-send this communication to the sender and delete the original
message and any copy of it from your computer system. Thank you. ---




_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to