RE: [MI-L] Sorting records by val of a character formatted column
Title: RE: [MI-L] Sorting records by val of a character formatted column Dave, I think you have found the right method, but you might not be able to sort by an _expression_ directly, so you would need to add the _expression_ to the list of columns to select and then order by this new column. Select LOTNBR, Val(LOTNBR) LOTNBR_VAL From LOTS Order By LOTNBR_VAL 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 For enden af regnbuen... - hvordan kommer man dertil og er det overhovedet muligt? Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of David Reid Sent: Friday, July 28, 2006 5:45 AM To: MapInfo-L@lists.directionsmag.com Subject: [MI-L] Sorting records by val of a character formatted column Greetings List, I have a parcel table with the field [LOTNBR] formatted as Character Naturally when sorted you get: 1 10 11 12 2 20 21 etc etc I've tried using in the sort field val(LOTNBR) but to no avail to achieve: 1 2 3 4 etc Anyone know the syntax to do this? Thanks, Dave -- Outgoing mail is certified Virus Free Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/401 - Release Date: 07/26/2006 ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] MapInfo-L Reminder
To: MapInfo-L@lists.directionsmag.com From: [EMAIL PROTECTED] Subject: MapInfo-L Reminder This is just a reminder to help you manage your MapInfo-L subscription. This will be posted automatically each week, and please feel free to respond with suggestions or improvements. Check out the MapInfo-L wiki at http://www.mapinfo-l.com set up for us by Eric Frost [EMAIL PROTECTED]. Wikis are a very cool tool for building a community knowledge base. Join in and make your mark! - Bill Thoen and Peter Horsb?ll M?ller [EMAIL PROTECTED] CONTENTS 0. HOW TO POST MAIL TO MAPINFO-L 1. HOW TO SUBSCRIBE/UNSUBSCRIBE 2. HOW TO CHANGE YOUR SUBSCRIPTION SETTINGS 3. WHERE TO GO TO FIND NEWS WHEN THE LIST BREAKS 4. MAPINFO-L ARCHIVES -- 0. HOW TO POST MAIL TO MAPINFO-L If you are subscribed to the list, then sending mail to MapInfo-L@lists.directionsmag.com will send your message to everyone on the list. 1. HOW TO SUBSCRIBE/UNSUBSCRIBE You can subscribe, unsubscribe or change your account settings by going to http://www.directionsmag.com/mailman/listinfo/mapinfo-l. To subscribe, enter your email address and optionally your name, and then pick a password. A confirmation message will be sent to you, and after you confirm your request for subscription, you will begin receiving new mail from the list and will also be able to post mail to the list. To unsubscribe or change your account settings, go to the bottom of this page where you will see form controls that you can use to modify your account. You can do this all with email too. Just look at the X-headers in any MapInfo-L message and you'll see the addresses to send a blank email to to make the server do what you want. 2. HOW TO CHANGE YOUR SUBSCRIPTION SETTINGS You can change your account settings by going to http://www.directionsmag.com/mailman/listinfo/mapinfo-l. At the bottom of the page are form controls where you can specify your address and password to get access to your account settings form. 3. WHERE TO GO TO FIND NEWS WHEN THE LIST BREAKS Occasionally the angel of digital chaos descends on the 'net and sometimes smites MapInfo-L. Should this happen, you can find news and information about what's happening by going to http://www.gisnet.com/mapinfo-l.htm. 4. MAPINFO-L ARCHIVES The MapInfo archives are now available at http://www.directionsmag.com/pipermail/mapinfo-l/. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] MAPBASIC Object or not Object?
Hi I have what I believe is an object in a layer - I think it's a line - if I query it in the Maspbasic window in MI with select objectinfo (obj,1) from table_name then look at the selection table I see object type 3 ie a line. If I use the following line in some Mapbasic code which interrogates the same layer: If ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 4 or ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 7 then Then I get the following error when it gets to the object that I believe is a line: (Blah.mb:123)ObjectInfo: argument 2 out of range If I write what is happening out to a text file ie Print #1, (temptablearray(i) + + colname+ +colAlias + + ObjectInfo(ColAlias, OBJ_INFO_TYPE)) where colAlias is the Alias of the column name: ColAlias = Temptabname . Colname I get the following: Query134 Query134 object Polyline 4 The top line above is the line that I think is causing the problem, the second line above shows a result that works. Is this line an object or not and can I do anything to avoid the out of range error? I hope this all makes sense!! Nicki Nicki Cozens Data Management Officer Highways Development Control Leicestershire County Council County Hall Glenfield Leicester LE3 8RA Tel: 0116 265 7420 Fax: 0116 265 7133 ___ Leicestershire County Council - rated a 'four-star' council by the Audit Commission ___ This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Incoming and outgoing e-mail messages are routinely monitored for compliance with Leicestershire County Council's policy on the use of electronic communications. The contents of e-mails may have to be disclosed to a request under the Data Protection Act 1998 and the Freedom of Information Act 2000. The views expressed by the author may not necessarily reflect the views or policies of the Leicestershire County Council. Attachments to e-mail messages may contain viruses that may damage your system. Whilst Leicestershire County Council has taken every reasonable precaution to minimise this risk, we cannot accept any liability for any damage which you sustain as a result of these factors. You are advised to carry out your own virus checks before opening any attachment. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: [MI-L] MAPBASIC Object or not Object?
Im not going to pretend I understand whats going on. However, Ive found that aliases act flaky if you refer to them too many times between fetches. First, try replacing your problematic IF statement with a DO CASE statement and see if that works. If not, do what I always do: Retrieve the value of the alias into a variable, and then work with the variable. Object aliases are a little more difficult since you can't assign a null object to a variable, so you have to do something like: Dim o as object Dim o_a as alias o_a = sometab.obj ... fetch next from sometab if (o_a) then o=o_a do case ObjectInfo (o, OBJ_INFO_TYPE) case 4, 7 . etc. HTH Spencer From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicki Cozens Sent: Friday, July 28, 2006 9:14 AM To: mapinfo-l@lists.directionsmag.com Subject: [MI-L] MAPBASIC Object or not Object? Hi I have what I believe is an object in a layer - I think it's a line - if I query it in the Maspbasic window in MI with select objectinfo (obj,1) from table_name then look at the selection table I see object type 3 ie a line. If I use the following line in some Mapbasic code which interrogates the same layer: If ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 4 or ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 7 then Then I get the following error when it gets to the object that I believe is a line: (Blah.mb:123)ObjectInfo: argument 2 out of range If I write what is happening out to a text file ie Print #1, (temptablearray(i) + + colname+ +colAlias + + ObjectInfo(ColAlias, OBJ_INFO_TYPE)) where colAlias is the Alias of the column name: ColAlias = Temptabname . Colname I get the following: Query134 Query134 object Polyline 4 The top line above is the line that I think is causing the problem, the second line above shows a result that works. Is this line an object or not and can I do anything to avoid the out of range error? I hope this all makes sense!! Nicki Nicki Cozens Data Management Officer Highways Development Control Leicestershire County Council County Hall Glenfield Leicester LE3 8RA Tel: 0116 265 7420 Fax: 0116 265 7133 ___ Leicestershire County Council - rated a 'four-star' council by the Audit Commission ___ This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Incoming and outgoing e-mail messages are routinely monitored for compliance with Leicestershire County Council's policy on the use of electronic communications. The contents of e-mails may have to be disclosed to a request under the Data Protection Act 1998 and the Freedom of Information Act 2000. The views expressed by the author may not necessarily reflect the views or policies of the Leicestershire County Council. Attachments to e-mail messages may contain viruses that may damage your system. Whilst Leicestershire County Council has taken every reasonable precaution to minimise this risk, we cannot accept any liability for any damage which you sustain as a result of these factors. You are advised to carry out your own virus checks before opening any attachment. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] MAPBASIC Object or not Object?
Test the value of OBJ_INFO_TYPE just before you evaluate the expression. It should equal 1. If you haven't included MapBasic.def, or if you set up a variable like obj_info_type, that could cause that error. Also, it's better form to use the defined constants OBJ_TYPE_PLINE and OBJ_TYPE_REGION instead of 4 or 7; it makes your code easier to understand. Nicki Cozens wrote: Hi I have what I believe is an object in a layer - I think it's a line - if I query it in the Maspbasic window in MI with select objectinfo (obj,1) from table_name then look at the selection table I see object type 3 ie a line. If I use the following line in some Mapbasic code which interrogates the same layer: If ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 4 or ObjectInfo(ColAlias, OBJ_INFO_TYPE) = 7 then Then I get the following error when it gets to the object that I believe is a “line”: * (Blah.mb:123)ObjectInfo: argument 2 out of range * If I write what is happening out to a text file ie Print #1, (temptablearray(i) + + colname+ +colAlias + + ObjectInfo(ColAlias, OBJ_INFO_TYPE)) where colAlias is the Alias of the column name: ColAlias = Temptabname . Colname I get the following: Query134 Query134 object Polyline 4 The top line above is the “line” that I think is causing the problem, the second line above shows a result that works. Is this “line” an object or not and can I do anything to avoid the out of range error? I hope this all makes sense!! Nicki Nicki Cozens Data Management Officer Highways Development Control Leicestershire County Council County Hall Glenfield Leicester LE3 8RA Tel: 0116 265 7420 Fax: 0116 265 7133 ___ Leicestershire County Council - rated a 'four-star' council by the Audit Commission ___ This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Incoming and outgoing e-mail messages are routinely monitored for compliance with Leicestershire County Council's policy on the use of electronic communications. The contents of e-mails may have to be disclosed to a request under the Data Protection Act 1998 and the Freedom of Information Act 2000. The views expressed by the author may not necessarily reflect the views or policies of the Leicestershire County Council. Attachments to e-mail messages may contain viruses that may damage your system. Whilst Leicestershire County Council has taken every reasonable precaution to minimise this risk, we cannot accept any liability for any damage which you sustain as a result of these factors. You are advised to carry out your own virus checks before opening any attachment. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] MAPBASIC Object or not Object?
Spencer Simpson wrote: I’m not going to pretend I understand what’s going on. However, I’ve found that aliases act flaky if you refer to them too many times between fetches. I don't think they're flakey, you just have to understand how they work. Every time you fetch a new record, that updates the alias. If you need a variable that doesn't chnage with fetch, then as you say, use a normal variable. Object aliases are a little more difficult since you can't assign a null object to a variable... Another way to simulate a null object in a variable is to assign it to an object that has no dimension (e.g. a line with the start and end point in the same place, or pline or region with 0 nodes). Then to test null-ness check it's length or area and see if it's zero. I often use this technique in functions that return an object when a bad situation would otherwise cause a crash. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: [MI-L] MAPBASIC Object or not Object?
No, I've found that aliases (especially objects) can act strangely if you try to extract their values more than once between two successive fetches. Maybe newer versions of MapInfo are more robust, but it conditioned me to always fetch aliases into variables back in the 1990s. Using degenerate objects to simulate null objects is useful, but it doesn't help fetching them from a table, because you can't guarantee that a row didn't have its object deleted. It looks as if the original poster actually included mapbasic.def since his print statement worked. There may also be some subtle corruption that a Pack Table would reveal. HTH Spencer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Thoen Sent: Friday, July 28, 2006 10:27 AM To: mapinfo-l@lists.directionsmag.com Subject: Re: [MI-L] MAPBASIC Object or not Object? Spencer Simpson wrote: I'm not going to pretend I understand what's going on. However, I've found that aliases act flaky if you refer to them too many times between fetches. I don't think they're flakey, you just have to understand how they work. Every time you fetch a new record, that updates the alias. If you need a variable that doesn't chnage with fetch, then as you say, use a normal variable. Object aliases are a little more difficult since you can't assign a null object to a variable... Another way to simulate a null object in a variable is to assign it to an object that has no dimension (e.g. a line with the start and end point in the same place, or pline or region with 0 nodes). Then to test null-ness check it's length or area and see if it's zero. I often use this technique in functions that return an object when a bad situation would otherwise cause a crash. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] MAPBASIC Object or not Object?
Spencer Simpson wrote: No, I've found that aliases (especially objects) can act strangely if you try to extract their values more than once between two successive fetches. Maybe newer versions of MapInfo are more robust, but it conditioned me to always fetch aliases into variables back in the 1990s. I'd have to say, Prove it. IMHO, that's a superstition that you develpoed as you were learning and now it's just a habit. It's similar to the superstition that using defined constants is not safe. Using degenerate objects to simulate null objects is useful, but it doesn't help fetching them from a table, because you can't guarantee that a row didn't have its object deleted. That's right. And for that you can test the object itself (which is actually an alias). But once you put an object into a variable you need another way to indicate whether its valid or not. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] MapInof Discovery
I am using MapInfo Discovery to publish map for distribution. Recently, the program stopped working. I have to reinstall it. The problem is that I can not see all the maps I published before. The MapCategory does not show the category I had before. Before I uninstall the program, I saved the Discovery folder on different HD. There got to be a way to recover the published maps. Can anyone point me the direction? Thanks Jiye Zhang NYC DEP DWQC Field Operation (718) 595-6313 (718) 595-6399 (fax) [EMAIL PROTECTED] ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] Labels not showing up in Print Layout
Title: Labels not showing up in Print Layout Hi everyone, Thanks for the replies on my question yesterday abou the workspace not opening. I had to recreate the page I was trying to open as someone needed it right away, but I will try the suggestions later this afternoon. My next problem is regarding labels. In my print layout only half of my labels are showing up but when I go back to my map they are all there. I thought when I printed they might show up, but no such luck. It also seems that only the labels that I haven't clicked on an adjusted are coming up. Any thoughts? Thanks Christine ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] Job at Coldwater Creek
I have a new job opening at our headquarters in Sandpoint, Idaho. I lead a group of statisticians and geographers in all sorts of initiatives. For the right person, this will be a fun job. Please let me know if you have any questions or comments. Carl Brenner Manager, Statistics and Geography Coldwater Creek Title: Senior GIS Analyst Research and Development Position Statement: Were growing fast and we need your help! Coldwater Creek, recognized by BusinessWeek as one of the top 100 Hot Growth companies, is rapidly adding stores nationwide. We need your creativity, knowledge, and geographic passion to provide proactive business intelligence to guide store location decisions and to provide geographic support throughout the company. If you are driven to weave disparate data into insightful spatial analysis, then this is the job for you. Your primary responsibility is to provide the vision of the geographic data warehouse from which we generate our innovative, actionable, and intuitive geographic support. Your primary objective is to go beyond basic maps and reports to deliver comprehensive, clever, and clear business intelligence to guide optimal decisions from store locations to targeted marketing campaigns. Your opportunities are endless. Youll be directly involved with our expansion and execution strategies with regular contact with executives. Your strengths, abilities, and spatial analysis experience will drive our geographic innovation. Help us continue our hot growth! Job Responsibilities: * Provide the vision and execution leadership to evolve our unique, ½ terabyte geographic data warehouse which combines customer sales, customer activities, demographics, geographic constructs, and automation. Develop an appropriate database architecture to balance software needs, vendor supplied data, self-generated data, and data from our transaction data warehouse. * Assume a lead role in matching spatial analysis solutions - including collecting data, ETL techniques, developing appropriate geographic constructs, conducting spatial analysis, and delivering results - to complex business problems throughout the company, but mainly focused on store location decisions and targeted marketing campaigns. * Develop automated geographic routines and processes to efficiently support spatial analysis in a production environment utilizing SQL Server, DTS, MapInfo, MapBasic, and SpatialWare. * Provide business intelligence leadership to assist in non-geographic analysis and processes. * Integrate throughout the company, particularly with the Real Estate and Marketing departments, to provide actionable business intelligence * Integrate with statisticians to infuse geographic thought into statistical processes. * Proactively utilize new tools, new technologies, new ideas, and new methods to provide outstanding innovations, creative solutions to unexpected issues, and building scalable solutions. Skill Requirements: * Bachelors degree in Geography, Statistics, Mathematics, Computer Science, or related field of study is required. Masters degree preferred. * Desire to constantly improve existing processes via technical and analytical innovation * 5 years experience in automating GIS in a production environment (MapInfo and MapBasic preferred) * 3 years experience with ETL tools and non-geographic analysis techniques (SQL Server/DTS preferred) * 3 years experience with a spatially enabled database (SpatialWare preferred) * 3 years experience in utilizing transaction based data warehouses (retail experience preferred) * 3 years experience in web development and web programming (ASP and .Net preferred) * Excellent communication and presentation skills. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: [MI-L] Labels not showing up in Print Layout
Title: Message Sounds like you have a "Allow overlapping text" issue on one or more of your layers which is preventing your labels from appearing. By you manually editing the lable, it becomes a custom label which in my experience, overides the label preferences such as "Allow overlapping text" Try enabling this check box for the layer you need to label and see if that works. Dave -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ronning, ChristineSent: Friday, July 28, 2006 11:29 AMTo: MapInfo-L@lists.directionsmag.comSubject: [MI-L] Labels not showing up in Print Layout Hi everyone, Thanks for the replies on my question yesterday abou the workspace not opening. I had to recreate the page I was trying to open as someone needed it right away, but I will try the suggestions later this afternoon. My next problem is regarding labels. In my print layout only half of my labels are showing up but when I go back to my map they are all there. I thought when I printed they might show up, but no such luck. It also seems that only the labels that I haven't clicked on an adjusted are coming up. Any thoughts? Thanks Christine --Checked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 07/27/2006 -- Outgoing mail is certified Virus Free Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 07/27/2006 ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: [MI-L] Labels not showing up in Print Layout
Title: Message Thanks David, I actually just closed out of the workspace and re-opened it and noweverything works fine! Sorry should have tried this before posting the question. Christine From: David Reid [mailto:[EMAIL PROTECTED] Sent: Friday, July 28, 2006 9:40 AMTo: Ronning, Christine; MapInfo-L@lists.directionsmag.comSubject: RE: [MI-L] Labels not showing up in Print Layout Sounds like you have a "Allow overlapping text" issue on one or more of your layers which is preventing your labels from appearing. By you manually editing the lable, it becomes a custom label which in my experience, overides the label preferences such as "Allow overlapping text" Try enabling this check box for the layer you need to label and see if that works. Dave -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ronning, ChristineSent: Friday, July 28, 2006 11:29 AMTo: MapInfo-L@lists.directionsmag.comSubject: [MI-L] Labels not showing up in Print Layout Hi everyone, Thanks for the replies on my question yesterday abou the workspace not opening. I had to recreate the page I was trying to open as someone needed it right away, but I will try the suggestions later this afternoon. My next problem is regarding labels. In my print layout only half of my labels are showing up but when I go back to my map they are all there. I thought when I printed they might show up, but no such luck. It also seems that only the labels that I haven't clicked on an adjusted are coming up. Any thoughts? Thanks Christine --Checked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 07/27/2006 --Outgoing mail is certified Virus FreeChecked by AVG Free Edition.Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 07/27/2006 ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] Alter Object Fail
Hi All, I'm trying to move all the nodes of a polygon. I can verify that the code is changing the x and y coords by asking for a Note with the current x and y coords. The node isnt moving on the mapper though. When I tried to remove one of the nodes, to see if that would work, I get an "Alter Object Remove Node Failed" error. Any thoughts on whats happening here? Erin Erin Comparri | Mapping SpecialistCB Richard Ellis | CBRE Mapping Center1620 Fountainhead Pkwy, Suite 610 | Tempe, AZ 85282MC 877 580 4674 | F 480 929 6400 [EMAIL PROTECTED] | www.cbre.com | mapping.cbre.com ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: [MI-L] MAPBASIC Object or not Object?
That's right. And for that you can test the object itself (which is actually an alias). But once you put an object into a variable you need another way to indicate whether its valid or not. I agree, Bill. It could be very usefull, if there was a function in MapBasic that actual could test whether an object was legal or not/exists or was null, or what ever you want to call this state. This is especially usefull when you have a function, that expects to get an object and also returns an object. How would you handle this situation ? What you make sure that you don't call the function with a not existing object, or could in some way handle the problem inside the function in a smart manner without corupting the table ? I tend to check before calling the funtion, but would love to hear about a solution to the second if possible. 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 For enden af regnbuen... - hvordan kommer man dertil og er det overhovedet muligt? Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Thoen Sent: Friday, July 28, 2006 5:39 PM To: Spencer Simpson Cc: mapinfo-l@lists.directionsmag.com Subject: Re: [MI-L] MAPBASIC Object or not Object? Spencer Simpson wrote: No, I've found that aliases (especially objects) can act strangely if you try to extract their values more than once between two successive fetches. Maybe newer versions of MapInfo are more robust, but it conditioned me to always fetch aliases into variables back in the 1990s. I'd have to say, Prove it. IMHO, that's a superstition that you develpoed as you were learning and now it's just a habit. It's similar to the superstition that using defined constants is not safe. Using degenerate objects to simulate null objects is useful, but it doesn't help fetching them from a table, because you can't guarantee that a row didn't have its object deleted. That's right. And for that you can test the object itself (which is actually an alias). But once you put an object into a variable you need another way to indicate whether its valid or not. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] Alter Object Fail
Eric, I assume that you're doing this with Alter Object. The result of the operation requires that you Update the table that you started with after you're done altering the object. For example: '-- include mapbasic.def Declare Sub Main() Declare Sub movePolygons(ByVal tableName As String, ByVal deltaX As Float, ByVal deltaY As Float) Sub Main() Open Table C:\Program Files\MapInfo\Professional\Data\Tut_Data\Tut_USA\USA\States.Tab Call movePolygons(States, 1.0, 1.0) End Sub Sub movePolygons(ByVal tableName As String, ByVal deltaX As Float, ByVal deltaY As Float) Dim x, y As Float Dim oRegion As Object Dim alObject As Alias Dim i, j, k As Integer Dim nPolys, nNodes As Integer For i = 1 to TableInfo(tableName, TAB_INFO_NROWS) Print Working on Object # + i Fetch Rec i From tableName OnError Goto ErrHandler alObject = tableName + .Obj oRegion = alObject If ObjectInfo(oRegion, OBJ_INFO_TYPE) = OBJ_TYPE_REGION Then nPolys = ObjectInfo(oRegion, OBJ_INFO_NPOLYGONS) Print+ nPolys + Polygon(s) to process... For j = 1 to nPolys nNodes = ObjectInfo(oRegion, OBJ_INFO_NPOLYGONS + j) Print + nNodes + Node(s) in Polygon # + j For k = 1 to (nNodes - 1) If k Mod 1000 = 0 Then Print+ k End If x = ObjectNodeX(oRegion, j, k) y = ObjectNodeY(oRegion, j, k) Alter Object oRegion Node Set Position j, k (x + deltaX, y + deltaY) Next Next Update tableName Set Obj = oRegion Where RowID = i End If Next Exit Sub ErrHandler: Resume Next End Sub '-- Ian Erickson AnalyGIS, LLC http:// www.analygis.com Comparri, Erin @ Tempe wrote: Hi All, I'm trying to move all the nodes of a polygon. I can verify that the code is changing the x and y coords by asking for a Note with the current x and y coords. The node isnt moving on the mapper though. When I tried to remove one of the nodes, to see if that would work, I get an Alter Object Remove Node Failed error. Any thoughts on whats happening here? Erin Erin Comparri | Mapping Specialist CB Richard Ellis | CBRE Mapping Center 1620 Fountainhead Pkwy, Suite 610 | Tempe, AZ 85282 MC 877 580 4674 | F 480 929 6400 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | www.cbre.com http://www.cbre.com/ | mapping.cbre.com ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] Another MapInfo-L archive
For those want to search MapInfo-L archives, I just discovered a new archive: http://www.mail-archive.com/mapinfo-l%40lists.directionsmag.com/. This one has some basic search ability and no advertising. I don't know who set it up or why, but it's free and seems to work pretty well. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: [MI-L] Proviewer 8.5
OK found this page which points to the English and French versions. IL Thomas GeoSciSoft- Perth, Australia From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SCISOFT Sent: Saturday, July 29, 2006 11:03 AM To: mapinfo-l@lists.directionsmag.com Subject: [MI-L] Proviewer 8.5 Can someone give me a URL for v8.5 of the MapInfo Proviewer? I can find a link (somewhere on sitepass) that shows proviewer80.exe but maybe thats actually a v8.5 download? Ian Thomas GeoSciSoft - Perth, Australia ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l