Hi Everyone,
I was hoping that someone may be able to work this problem out for me. I am creating a program to allow the automation of working maps for our company. Basically I use a couple of dialogues to get the user to choose the map and general location. The program then finds this selection and centres it according to the selection's centroid. This works fine every time when I run the program from MapBasic. However, when I run the program through a menu it works properly the first time, the second time it returns incorrect values for the variables fltxcentroid and fltycentroid. Its always the same number for both x and y 694444.44
s_plantation_table is determined via a dialogue.
Select * from s_plantation_table where COMP= s_compNumber into selection
strTempTab=SelectionInfo(Sel_Info_SelName)
aliObj = strTempTab+".OBJ"
note aliobj
aobj = selection.obj
fltXcentroid=centroidX(aobj)
note fltXcentroid
fltYcentroid=centroidY(aobj)
note fltYcentroid
Set Map
Center (fltXcentroid,fltYcentroid)
any suggestions would be much appreciated.
Cheers.
Jacqueline.
Jacqueline Sloggett
Plantation Analyst
Hancock Victorian Plantations
P.O. Box 534
Collins St West
Melbourne
Victoria 3000
Australia
E-mail: [EMAIL PROTECTED]
"We don't see things as they are, we see them as we are" - Anais Nin
"Do or Do Not - There is No Try" - Yoda
