Hi all!  Thanks for your swift help!

It came down to the following:
        1.  Make sure that all the points are geocoded (yes, they were)
        2.  Make sure that StartX and StartY are declared as floats (yes,
they were)
        3.  Use the "alias" variable
                Dim TabAlias as alias
                TabAlias = Tablename + ".obj"
                  StartX = CentroidX(TabAlias)
                  StartY = CentroidY(TabAlias)

Things are running smoothly.  Thanks again!

        -Dara Thompson


-----Original Message-----
From: Thompson, Dara L. (RyTull) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 9:20 AM
To: 'MapInfo-L'
Subject: 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.


--- 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.

Reply via email to