Thanks Bill! That is exactly what I was looking for. -----Original Message----- From: Bill Thoen [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 01, 2004 7:33 AM To: Canfield, Andrew Cc: MapInfo-L Subject: Re: MI-L Set multiple object symbols quickly?
"Canfield, Andrew" wrote: > > Is there a quick way to set the symbol for a large selection of objects > using MapBasic? Write a function in MB that returns an object when passed your Type variable and use it in the UPDATE statement like so: UPDATE MyTable SET obj = MyFunction( Type ) Note that table columns like 'Type' must be passed ByVal. This trick works MUCH faster than a Do Loop! > > Here is my problem: I have a series of tables, in each of these > tables I have multiple point object groups, they are grouped by a field > called "type" in my MapBasic I select all from that table where the "type" > like "x". > Currently I loop through the selection and set each row's object > symbol to what I want it to be. This is horrendously slow considering there > can be 100,000+ objects for each selection I run on the table and there can > be 15 to 20 different "type"'s within the table. > So I'm wondering if there is a MapBasic statement where I could do > something along the lines of "Set Symbol = MakeSymbol(1,1,255) Where (Select > * From MyTable Where Type Like X)" > > A sort of sub query to set the symbol on a mass selection? Does something > like this exist or is there only one way to do this? > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Message number: 11983 -- - Bill Thoen ------------------------------------------------------------ GISnet, 1401 Walnut St., Suite C, Boulder, CO 80302 tel: 303-786-9961, fax: 303-443-4856 http://www.gisnet.com/ ------------------------------------------------------------ --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 11987