Thanks, Peter It solved my problem. Regards
Mahtab Alam On 12/29/05, Peter Horsbøll Møller <[EMAIL PROTECTED]> wrote: > > I think this would be the prober way: > > Include "MapBasic.def" > > '...Declare Sub etc > > Dim sTab As String, > aObj As Alias, > fMinX, fMinY, fMaxX, fMaxY As Float > oCur As Object > > sTab = "ANYTABLENAME" > aObj = sTab + ".OBJ" > > Set CoordSys Table sTab > > Fetch First From sTab > Do Until EOT(sTab) > oCur = aObj > > fMinX = ObjectGeography(oCur, OBJ_GEO_MINX) > fMinY = ObjectGeography(oCur, OBJ_GEO_MINY) > fMaxX = ObjectGeography(oCur, OBJ_GEO_MAXX) > fMaxY = ObjectGeography(oCur, OBJ_GEO_MAXY) > > '**Here you do what you want to with these coordinates > > Fetch Next From sTab > Loop > > HTH, > > Peter Horsbøll Møller > GIS Developer, MTM > Geographical Information & IT > > COWI A/S > Odensevej 95 > DK-5260 Odense S. > Denmark > > Tel +45 6311 4900 > Direct +45 6311 4908 > Mob +45 5156 1045 > Fax +45 6311 4949 > E-mail [EMAIL PROTECTED] > *http://www.cowi.dk/gis* <http://www.cowi.dk/gis> > > -----Original Message----- > From: [EMAIL PROTECTED] [* > mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]>] > On Behalf Of Mahtab Alam > > Sent: Wednesday, December 28, 2005 8:20 AM > To: [email protected] > Subject: Re: [MI-L] Help with Object Functions > > > I did this also though this doesn't give any compile error , it gives > error at run time as argument is of invalid type. > > Actually I am trying to visit all the objects ( which in my case are all > regions) of a perticular layer...so i am storing that layer's name in > variable tabname and than trying to read centroid , max and min points of > its objects using which I will zoom to them. But I am unable to understand > why its not working if i give the name (constLayer.obj) of layer instead > of tabname ( variable) it works the way I want. Can u please explain ? > > On 12/25/05, Trey Pattillo <[EMAIL PROTECTED]> wrote: > > > > > > According to your example ObjectGeography(tablename.obj,OBJ_GEO_MINX ) > > > > it is not "tablename.OBJ" -- just TableName > > > > direct code --- = ObjectGeography(MyTableName.......) > > variable: > > DIM aTable as String > > aTable = MyTableName > > ObjectGeography(aTable.......) > > > > > > On Sunday 25 December 2005 06:09, Mahtab Alam wrote: > > > Hi, > > > > > > Can anyone help me why I am getting a error message whenever I put a > > > varibale ( that stores the table name) in any Object function e.g. > > > > > > MinX=ObjectGeography(tablename.obj,OBJ_GEO_MINX ) it doesn't > > > compile > > but > > > when I give any other name which i have defined it doesn't show any > > error. > > > > > > > > > Regards > > > Mahtab > > > _______________________________________________ > > > MapInfo-L mailing list > > > [email protected] > > > *http://www.directionsmag.com/mailman/listinfo/mapinfo-l*<http://www.directionsmag.com/mailman/listinfo/mapinfo-l> > > > > -- > > Trey Pattillo > > > > Eye have a spelling chequer. > > It came with my pea see. > > It plainly marks for my revue > > Miss takes I can not sea. > > > > > -- > Regards > > Mahtab Alam > _______________________________________________ > MapInfo-L mailing list > [email protected] * > http://www.directionsmag.com/mailman/listinfo/mapinfo-l*<http://www.directionsmag.com/mailman/listinfo/mapinfo-l> > > -- Regards Mahtab Alam Sr. CAD Engineer Infotech Enterprises Limited B-37, Sector -1 Noida 201 301 "When the only tool you have is a hammer, you tend to treat all of your problems like nails." _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
