[MI-L] Scale in layouts
Hi I have recently upgraded to v8.5 and am now having trouble maintaining map window scales. Previously where I selected a single object and went to that object in every window (control A), the scale did not change (in the map windows or layout frames). How do I preserve the scale so that I don't have to rescale every frame in my layout every time I move to another object? Regards Kylie Jamieson ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] Extracting data from gridded file
This is more of an FYI. Excel 2007 has (finally) removed the 256 column and 65536 row cap. It is now 4096 columns and 1048576 rows so a free download of the beta might be a solution. Cheers, Rob Graham Bish wrote: Hi all I have data in a gridded txt file that I have imported into MapInfo I am unfamiliar with this type of file, I can use the info tool to display data but I need to extract this data by regions into a database (file is 800 columns which excel Access cannot handle) and all the SQL functions seem to be unavailable for this file type Can you help? Kind regards Graham Bish Senior Consultant Neil Clark Associates Ph. 03 5441 1244 Fx. 03 5441 1366 ___ 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] MapBasic - How to tell if a ButtonPad is Showing
Re the posting on 07-21-2006 and reply by Lars I. Nielsen: Do you have an example of how WindowInfo is used to find the Show/Hide status of a floating button bar? I'm struggling with showing and hiding a button pad. I create the button bar and make sure that it has show as one of the attributes. I then issue the command buttonpad_id = FrontWindow() to obtain the window id. I tried to then issue the Set Window buttonpad_id Hide but it said I couldn't do that to that kind of window, so I tried Close Window buttonpad_id instead and it would appear that when I used the FrontWindow() command it was picking up the map window instead of the button pad I had just created as the map window closes and not the button pad. Any suggestions as to what I am doing wrong? Here is the code: Create ButtonPad Accept As PushButton Icon 185 HelpMsg Click to accept when happy Calling Accept_changes PushButton Icon 195 HelpMsg Click to reject Calling reject_changes Width 3 Position (2,2) Show Float buttonpad_id = FrontWindow() 'The following would not work with the window in question 'Set Window buttonpad_id ' Hide Close Window buttonpad_id 'this closed the map window Many thanks Nicki ___ 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 - How to tell if a ButtonPad is Showing
Title: RE: [MI-L] MapBasic - How to tell if a ButtonPad is Showing Hi, Here is a small function that will toggle the appearance of a named buttonpad. You can use this as inspiration ;-) - ButtonPadInfo(name_of_buttonpad, BTNPAD_INFO_WINID) will return the WindowID of the buttonpad - WindowInfo(nWID, WIN_INFO_OPEN) will, when used on a buttonpad, tell you if the buttonpad is shown (=true) or hidden (=false) ' Sub PADShowHide(ByVal sPadName As String ) Dim nWID As Integer OnError GoTo ErrorOccured nWID = ButtonPadInfo(sPadName, BTNPAD_INFO_WINID) If WindowInfo(nWID, WIN_INFO_OPEN) Then Alter ButtonPad sPadName Hide Else Alter ButtonPad sPadName Show End If '--- ErrorOccured: End Sub ' 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 Nicki Cozens Sent: Wednesday, August 02, 2006 10:23 AM To: mapinfo-l@lists.directionsmag.com Subject: [MI-L] MapBasic - How to tell if a ButtonPad is Showing Re the posting on 07-21-2006 and reply by Lars I. Nielsen: Do you have an example of how WindowInfo is used to find the Show/Hide status of a floating button bar? I'm struggling with showing and hiding a button pad. I create the button bar and make sure that it has show as one of the attributes. I then issue the command buttonpad_id = FrontWindow() to obtain the window id. I tried to then issue the Set Window buttonpad_id Hide but it said I couldn't do that to that kind of window, so I tried Close Window buttonpad_id instead and it would appear that when I used the FrontWindow() command it was picking up the map window instead of the button pad I had just created as the map window closes and not the button pad. Any suggestions as to what I am doing wrong? Here is the code: Create ButtonPad Accept As PushButton Icon 185 HelpMsg Click to accept when happy Calling Accept_changes PushButton Icon 195 HelpMsg Click to reject Calling reject_changes Width 3 Position (2,2) Show Float buttonpad_id = FrontWindow() 'The following would not work with the window in question 'Set Window buttonpad_id ' Hide Close Window buttonpad_id'this closed the map window Many thanks Nicki ___ 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] Fetch and table cursor position with Integrated Mapping
Title: Message I cannot see any code that actually adds the Rows to the DataTable dt Is it that your FIXES are actually working around this mistake, but not actually reporting anything related to dt.Rows.Count I think so. IL Thomas GeoSciSoft- Perth, Australia ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] Fetch and table cursor position with Integrated Mapping
Hi Christophe, You may have edited the shown code too much, 'cause I can't see any data transfer to "dt" at all. So the output ought to be "table : 0" ;-) But no, ColumnInfo doesn't effect the row/record pointer in my experience. It may be some effect of the removed code. Try publishing the complete code. Best regards / Med venlig hilsen Lars I. Nielsen GisPro Christophe Brabant wrote: Message Hi everyone, still a strange phenomen Does the ColumnInfo statment affect the current cursor position in a table ? Look at the following sample, written in VB.NET : Public Sub Test(ByVal nom_layer As String) Dim msg As String Dim nom_col As String Dim dt As DataTable Dim nb_cols As Short Dim i As Short Dim type_col As Short Dim col_type As System.Type Dim nb_rows As Integer Dim j As Integer Dim log_val As String Dim rowid As Integer'**FOR FIXING BUG*** Dim jj As Integer Try msg = "TableInfo(" + nom_layer + "," + TAB_INFO_NROWS.ToString + ")" jj = mapinfo.eval(msg) Console.WriteLine("nb rows into " + nom_layer + " : " + jj.ToString) mapinfo.Do("Fetch First From " + nom_layer) jj = 0 While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F") mapinfo.Do("Fetch Next From " + nom_layer) jj += 1 End While Console.WriteLine("nb rows processed at EOT : " + jj.ToString) msg = "TableInfo(" + nom_layer + "," + TAB_INFO_NCOLS.ToString + ")" nb_cols = mapinfo.eval(msg) dt = New DataTable(nom_layer) For i = 1 To nb_cols msg = "ColumnInfo(" + nom_layer + "," + + "COL" + i.ToString + + "," _ + COL_INFO_NAME.ToString + ")" nom_col = mapinfo.eval(msg) msg = "ColumnInfo(" + nom_layer + "," + + nom_col + + "," _ + COL_INFO_TYPE.ToString + ")" type_col = mapinfo.eval(msg) Select Case type_col Case COL_TYPE_CHAR col_type = System.Type.GetType("System.String") Case COL_TYPE_DECIMAL col_type = System.Type.GetType("System.Decimal") Case COL_TYPE_INTEGER col_type = System.Type.GetType("System.Int32") Case COL_TYPE_SMALLINT col_type = System.Type.GetType("System.Int16") Case COL_TYPE_DATE col_type = System.Type.GetType("System.DateTime") Case COL_TYPE_LOGICAL col_type = System.Type.GetType("System.Boolean") Case COL_TYPE_FLOAT col_type = System.Type.GetType("System.Double") Case COL_TYPE_GRAPHIC ' special column 'Obj' : nothing to do GoTo next_column Case Else ' unknown type MessageBox.Show("Table " + nom_layer _ + " : impossible de dterminer le type de la colonne '" + nom_col + "'.", _ "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error) End Select dt.Columns.Add(nom_col, col_type) next_column: Next mapinfo.Do("Fetch First From " + nom_layer) jj = 0 While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F") 'rowid = mapinfo.eval(nom_layer + ".RowId") '**FOR FIXING BUG*** For i = 1 To nb_cols msg = "ColumnInfo(" + nom_layer + "," + + "COL" + i.ToString + + "," _ + COL_INFO_TYPE.ToString + ")" type_col = mapinfo.eval(msg) Next 'mapinfo.do("Fetch Rec " + rowid.ToString + " From " + nom_layer) '**FOR FIXING BUG*** mapinfo.Do("Fetch Next From " + nom_layer) jj += 1 End While dt.AcceptChanges() Console.WriteLine("table:" + dt.Rows.Count.ToString) Catch ex As Exception Fonctions_diverses.DisplayException(ex) End Try End Sub The output is : nb rows intoMonde7 : 252 == OK nb rows processed at EOT : 252 == OK table:133 (for example, or 365, or 411, etc) == should be 252 ! ColumnInfo statment, with COL_INFO_TYPE paramater, seems to affect current cursor position into the Monde7 table (world7 in english) sometimes forward, sometimes backward, and by this way, due to the 'While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F")' _expression_, the number of lines processed is greater or lower than the true value, who is 252 ! To fix that, I had to add the two lines marked with **FOR FIXING BUG*** in the code. Any idea ? Thank you - Chris ___ 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 - How to tell if a ButtonPad is Showing
Hi Nicki, Certainly :-) Dim i As SmallInt Dim WID As Integer Dim name As String For i = 1 To NumAllWindows() WID = WindowID(-i) If WindowInfo(WID,WIN_INFO_TYPE) = WIN_BUTTONPAD Then name = WindowInfo(WID,WIN_INFO_NAME) If WindowInfo(WID,WIN_INFO_OPEN) Then Print BUTTONPAD, name = + name + is visible ... Showing and hiding buttonpads are done using the Alter ButtonPad statement, as such (hiding all buttonpads) : Dim i As SmallInt Dim WID As Integer Dim name As String For i = 1 To NumAllWindows() WID = WindowID(-i) If WindowInfo(WID,WIN_INFO_TYPE) = WIN_BUTTONPAD Then name = WindowInfo(WID,WIN_INFO_NAME) If WindowInfo(WID,WIN_INFO_OPEN) Then Alter ButtonPad name Hide ... Buttonpads are not normal windows, and FrontWindow() and Close Window can only be used on browsers, mappers, graph and layout windows. Best regards / Med venlig hilsen Lars I. Nielsen GisPro Nicki Cozens wrote: Re the posting on 07-21-2006 and reply by Lars I. Nielsen: Do you have an example of how WindowInfo is used to find the Show/Hide status of a floating button bar? I'm struggling with showing and hiding a button pad. I create the button bar and make sure that it has show as one of the attributes. I then issue the command buttonpad_id = FrontWindow() to obtain the window id. I tried to then issue the Set Window buttonpad_id Hide but it said I couldn't do that to that kind of window, so I tried Close Window buttonpad_id instead and it would appear that when I used the FrontWindow() command it was picking up the map window instead of the button pad I had just created as the map window closes and not the button pad. Any suggestions as to what I am doing wrong? Here is the code: Create ButtonPad Accept As PushButton Icon 185 HelpMsg Click to accept when happy Calling Accept_changes PushButton Icon 195 HelpMsg Click to reject Calling reject_changes Width 3 Position (2,2) Show Float buttonpad_id = FrontWindow() 'The following would not work with the window in question 'Set Window buttonpad_id ' Hide Close Window buttonpad_id 'this closed the map window Many thanks Nicki ___ 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
TR : [MI-L] Fetch and table cursor position with Integrated Mapping
Title: Message complete code, with datarows added this changes absolutly nothing to my problem, but of course, with the first version of this code, dt.rows.count will always be 0 ! storing the rowid of each row, then fetching this rowid just before fetching the next row, solves the problem the same code directly with MapBasic works fine, without storing and fetching RowId Christophe -Message d'origine-De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Christophe BrabantEnvoyé: mercredi 2 août 2006 09:21À: mapinfo-l@lists.directionsmag.comObjet: [MI-L] Fetch and table cursor position with Integrated Mapping Hi everyone, still a strange phenomen Does the ColumnInfo statment affect the current cursor position in a table ? Look at the following sample, written in VB.NET : Public Sub Test(ByVal nom_layer As String) Dim msg As String Dim nom_col As String Dim dt As DataTable Dim nb_cols As Short Dim i As Short Dim type_col As Short Dim col_type As System.Type Dim nb_rows As Integer Dim j As Integer Dim log_val As String Dim rowid As Integer'**FOR FIXING BUG***Dim jj As Integer Dim nr As DataRow Try msg = "TableInfo(" + nom_layer + "," + TAB_INFO_NROWS.ToString + ")" jj = mapinfo.eval(msg) Console.WriteLine("nb rows into " + nom_layer + " : " + jj.ToString) mapinfo.Do("Fetch First From " + nom_layer) jj = 0 While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F") mapinfo.Do("Fetch Next From " + nom_layer) jj += 1 End While Console.WriteLine("nb rows processed at EOT : " + jj.ToString) msg = "TableInfo(" + nom_layer + "," + TAB_INFO_NCOLS.ToString + ")" nb_cols = mapinfo.eval(msg) dt = New DataTable(nom_layer) For i = 1 To nb_cols msg = "ColumnInfo(" + nom_layer + "," + + "COL" + i.ToString + + "," _ + COL_INFO_NAME.ToString + ")" nom_col = mapinfo.eval(msg) msg = "ColumnInfo(" + nom_layer + "," + + nom_col + + "," _ + COL_INFO_TYPE.ToString + ")" type_col = mapinfo.eval(msg) Select Case type_col Case COL_TYPE_CHAR col_type = System.Type.GetType("System.String") Case COL_TYPE_DECIMAL col_type = System.Type.GetType("System.Decimal") Case COL_TYPE_INTEGER col_type = System.Type.GetType("System.Int32") Case COL_TYPE_SMALLINT col_type = System.Type.GetType("System.Int16") Case COL_TYPE_DATE col_type = System.Type.GetType("System.DateTime") Case COL_TYPE_LOGICAL col_type = System.Type.GetType("System.Boolean") Case COL_TYPE_FLOAT col_type = System.Type.GetType("System.Double") Case COL_TYPE_GRAPHIC ' special column 'Obj' : nothing to do GoTo next_column Case Else ' unknown type MessageBox.Show("Table " + nom_layer _ + " : impossible de déterminer le type de la colonne '" + nom_col + "'.", _ "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error) End Select dt.Columns.Add(nom_col, col_type) next_column: Next mapinfo.Do("Fetch First From " + nom_layer) jj = 0 While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F") nr = dt.NewRow() 'rowid = mapinfo.eval(nom_layer + ".RowId") '**FOR FIXING BUG*** For i = 1 To nb_cols msg = "ColumnInfo(" + nom_layer + "," + + "COL" + i.ToString + + "," _ + COL_INFO_TYPE.ToString + ")" type_col = mapinfo.eval(msg) Select Case type_col Case COL_TYPE_CHAR, COL_TYPE_INTEGER, COL_TYPE_SMALLINT, COL_TYPE_DATE nr(i - 1) = mapinfo.Eval(nom_layer + ".COL" + i.ToString)Case COL_TYPE_LOGICAL log_val = mapinfo.Eval(nom_layer + ".COL" + i.ToString) If log_val = "T" Then nr(i - 1) = True Else nr(i - 1) = False End IfCase COL_TYPE_DECIMAL Dim v As String v = mapinfo.Eval(nom_layer + ".COL" + i.ToString) nr(i - 1) = CType(v.Replace("."c, ","c), Decimal)Case COL_TYPE_FLOAT Dim v As String v = mapinfo.Eval(nom_layer + ".COL" + i.ToString) nr(i - 1) = CType(v.Replace("."c, ","c), Double) End Select Next dt.Rows.Add(nr) 'mapinfo.do("Fetch Rec " + rowid.ToString + " From " + nom_layer) '**FOR FIXING BUG*** mapinfo.Do("Fetch Next From " + nom_layer) jj += 1 End While dt.AcceptChanges() Console.WriteLine("table:" + dt.Rows.Count.ToString) Catch ex As Exception Fonctions_diverses.DisplayException(ex) End Try End Sub The output is : nb rows intoMonde7 : 252 == OK nb rows processed at EOT : 252 == OK table:133 (for example, or 365, or 411, etc) == should be 252 ! ColumnInfo statment, with COL_INFO_TYPE paramater, seems to affect current cursor position into the Monde7 table (world7 in english) sometimes forward, sometimes backward, and by this way, due to the 'While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F")'
Re: TR : [MI-L] Fetch and table cursor position with Integrated Mapping
Title: Message Hi Christophe, No, it apparently doesn't change anything. I didn't expect so, I was looking for possible side effects. None such seems evident, however. Just to be very specific, your dt.Rows.Count reflects how many lines were added to dt, not how many were read from your MapInfo table. Try outputting the value of "jj" to see whether it has the correct value or not. It may be an un-trapped error in the dt.Rows.Add(nr) statement. -- Regarding your original question, the question could just as well be whether your data retrieval (e.g. mapinfo.Eval(nom_layer + ".COL" + i.ToString ) is the source of a side effects, rather than whether ColumnInfo() is. It's a more likely scenario in my opinion. Try removing all data retrieval statements, and see whether the problem persists. HTH Best regards / Med venlig hilsen Lars I. Nielsen GisPro Christophe Brabant wrote: complete code, with datarows added this changes absolutly nothing to my problem, but of course, with the first version of this code, dt.rows.count will always be 0 ! storing the rowid of each row, then fetching this rowid just before fetching the next row, solves the problem the same code directly with MapBasic works fine, without storing and fetching RowId Christophe -Message d'origine- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] De la part de Christophe Brabant Envoy: mercredi 2 aot 2006 09:21 : mapinfo-l@lists.directionsmag.com Objet: [MI-L] Fetch and table cursor position with Integrated Mapping Hi everyone, still a strange phenomen Does the ColumnInfo statment affect the current cursor position in a table ? Look at the following sample, written in VB.NET : Public Sub Test(ByVal nom_layer As String) Dim msg As String Dim nom_col As String Dim dt As DataTable Dim nb_cols As Short Dim i As Short Dim type_col As Short Dim col_type As System.Type Dim nb_rows As Integer Dim j As Integer Dim log_val As String Dim rowid As Integer'**FOR FIXING BUG*** Dim jj As Integer Dim nr As DataRow Try msg = "TableInfo(" + nom_layer + "," + TAB_INFO_NROWS.ToString + ")" jj = mapinfo.eval(msg) Console.WriteLine("nb rows into " + nom_layer + " : " + jj.ToString) mapinfo.Do("Fetch First From " + nom_layer) jj = 0 While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F") mapinfo.Do("Fetch Next From " + nom_layer) jj += 1 End While Console.WriteLine("nb rows processed at EOT : " + jj.ToString) msg = "TableInfo(" + nom_layer + "," + TAB_INFO_NCOLS.ToString + ")" nb_cols = mapinfo.eval(msg) dt = New DataTable(nom_layer) For i = 1 To nb_cols msg = "ColumnInfo(" + nom_layer + "," + + "COL" + i.ToString + + "," _ + COL_INFO_NAME.ToString + ")" nom_col = mapinfo.eval(msg) msg = "ColumnInfo(" + nom_layer + "," + + nom_col + + "," _ + COL_INFO_TYPE.ToString + ")" type_col = mapinfo.eval(msg) Select Case type_col Case COL_TYPE_CHAR col_type = System.Type.GetType("System.String") Case COL_TYPE_DECIMAL col_type = System.Type.GetType("System.Decimal") Case COL_TYPE_INTEGER col_type = System.Type.GetType("System.Int32") Case COL_TYPE_SMALLINT col_type = System.Type.GetType("System.Int16") Case COL_TYPE_DATE col_type = System.Type.GetType("System.DateTime") Case COL_TYPE_LOGICAL col_type = System.Type.GetType("System.Boolean") Case COL_TYPE_FLOAT col_type = System.Type.GetType("System.Double") Case COL_TYPE_GRAPHIC ' special column 'Obj' : nothing to do GoTo next_column Case Else ' unknown type MessageBox.Show("Table " + nom_layer _ + " : impossible de dterminer le type de la colonne '" + nom_col + "'.", _ "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error) End Select dt.Columns.Add(nom_col, col_type) next_column: Next mapinfo.Do("Fetch First From " + nom_layer) jj = 0 While (mapinfo.Eval("EOT(" + nom_layer + ")") = "F") nr = dt.NewRow() 'rowid = mapinfo.eval(nom_layer + ".RowId") '**FOR FIXING BUG*** For i = 1 To nb_cols msg = "ColumnInfo(" + nom_layer + "," + + "COL" + i.ToString + + "," _ + COL_INFO_TYPE.ToString + ")" type_col = mapinfo.eval(msg) Select Case type_col Case COL_TYPE_CHAR, COL_TYPE_INTEGER, COL_TYPE_SMALLINT, COL_TYPE_DATE nr(i - 1) = mapinfo.Eval(nom_layer + ".COL" + i.ToString) Case COL_TYPE_LOGICAL log_val = mapinfo.Eval(nom_layer + ".COL" + i.ToString) If log_val = "T" Then nr(i - 1) = True Else nr(i - 1) = False End If Case COL_TYPE_DECIMAL Dim v As String v = mapinfo.Eval(nom_layer + ".COL" + i.ToString) nr(i - 1) = CType(v.Replace("."c, ","c), Decimal) Case COL_TYPE_FLOAT Dim v As String v = mapinfo.Eval(nom_layer + ".COL" + i.ToString) nr(i - 1) = CType(v.Replace("."c, ","c), Double) End Select Next dt.Rows.Add(nr)
[MI-L] Created points are not shown on the map
Hello just a basic question. Christopher Brabante may already got this message.Im a total newcomer:Why does the map not show my created points (they are GPS points and converted in decimal points like (+35457900 for e.g.) and I think I chose the right Longitude/Latitude Formate (wcs84).Meanwhile, opening the layers control, and manipulating the etiquete or lets call it label, I still didnt see the symbols of the created points (it could happen that I use strange words to describe because I work with the spanish language version of mapinfo).Does anybody know where the big problem is? -- begin: vcard Sr. Sandy Marzella Flath Adr.I: Albergue Juvenil "San Lorenzo de El Escorial" C/Residencia Nº14 E-28200 San Lorenzo de El Escorial Tfn.: 0034 91 8 905 924 0034 687 791 167 Adr. II: DaimlerChrysler España, S.A. Asesoría Económica Red Avenida Bruselas, 30 28108 Alcobendas (Madrid) España Tfno: +34 91 484 61 03 Fax: +34 91 484 61 29 Adr.III: Fam. Beck c/o Sandy Flath Am Fuchsbau 11 A D-64319 Pfungstadt Tel.: 0049 (0) 61 57 - 86 536 Mob.: 0049 0 176-511 301 72 email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] end:vccard Echte DSL-Flatrate dauerhaft fr 0,- Euro*. Nur noch kurze Zeit! "Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
[MI-L] Co-ordinate extraction...
Title: Co-ordinate extraction... Hi All! Just a quick one which I'm sure there's a really simple answer for that I'm completely overlooking! I have a table containing polylines and I need to extract the X Y co-ordinates for both the start-point and end-point of each of the lines. I'm sure it's a really simple task but I can't for the life of me find a way to do it, so any help solving the problem would be much appreciated! Thanks in advance, Paul! * This message contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender and then delete the email and destroy any copies of it. Thank you. Hyder cannot guarantee that this message or any attachment is virus-free or has not been intercepted or changed. Any opinions or other information in this message that do not relate to the official business of the Company are neither given nor endorsed by it. * ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
RE: [MI-L] Creating grid of points
Thanks for everyone's suggestions Using the punti.mbx didn't seem to work, not sure I used it correctly as all field names for entry were in Italian, but was probably the projection issue I had with the second method. Andy's createpoint solution seemed to work well, once I had sorted the projection issue, although the correction figure needed to be -50 rather than -100 which moved the point to the centre of the square to the SW Gordon -Original Message- From: Andy Harfoot [mailto:[EMAIL PROTECTED] Sent: 01 August 2006 11:20 To: Barker, Gordon; mapinfo-l@lists.directionsmag.com Subject: Re: [MI-L] Creating grid of points Hi Gordon, You're almost there, but I'd transform the closed regions created in Gridmaker (with 100m spacing) into points using a bit of mapbasic code in the Mapbasic window: 1. Open your closed region grid table into a map window 2. Open the mapbasic window (Options Show MapBasic window) 3. Make sure Mapinfo works in the same coordinate system as your table by typing the following text into the MapBasic window on a blank line and pressing return (replace YourTableName with the name of the grid table): set coordsys table YourTableName 4. Replace each region with a point, offset from its centre by 100m in the x and y directions by typing the following text into the MapBasic window on a blank line and pressing return (replace YourTableName with the name of the grid table): update YourTableName set obj = createpoint(centroidx(obj)-100,centroidy(obj)-100) 5. Save the table - it should now show points at the 100m grid intersections. Andrew Barker, Gordon wrote: Hi I am trying to create a grid with single points appearing at each of the intersections of the horizontal and vertical lines. All attempts that have come to mind so far have not worked correctly. Can anyone please help? Desired result: Single points appearing at 100m spacing related to British Grid 6 figure grid references, (point would need to be at xxx,x00 m E, xxx,x00 m N) Approaches already tried: Gridmaker, Closed Regions (custom line style of single point at start)- start point does not appear at corner but partly up side of square Gridmaker, Straight Polylines followed by Enclose on lines (style as above)- Enclose mostly creates squares in a switchback sequence (N on first column, S on 2nd etc)leaving points only appearing on every 2nd column Approaches not tried: Polyline split of every vertical with every horizontal line and vice versa- 12x10km so too large by hand and don't have tool to automate Thank you Gordon __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l -- Andy Harfoot GeoData Institute University of Southampton Southampton SO17 1BJ Tel: +44 (0)23 8059 2719 Fax: +44 (0)23 8059 2849 www.geodata.soton.ac.uk --- For further information about GeoData's Training Courses, please visit: www.geodata.soton.ac.uk/training --- __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Ang. [MI-L] Created points are not shown on the map
Hi Sandy! The coordinate value seems awful big - sure you got the right numbers there? The length of the earths' equator is 40075000 meters. Or, the projection may expect degrees as coord. value in which case the number is even more impossible. Hälsning / Best regards Mats.E FB Engineering AB Södra Förstadsgatan 26 211 43 Malmö Tel: 040-660 25 50 Mobil: 0705-27 60 27 Fax: 040-660 25 99 [EMAIL PROTECTED] www.fbe.se Sandy Flath [EMAIL PROTECTED] Sänt av: [EMAIL PROTECTED] 2006-08-02 15:35 Till mapinfo-l@lists.directionsmag.com Kopia Ärende [MI-L] Created points are not shown on the map Hello just a basic question. Christopher Brabante may already got this message. I´m a total newcomer: Why does the map not show my created points (they are GPS points and converted in decimal points like (+35457900 for e.g.) and I think I chose the right Longitude/Latitude Formate (wcs84). Meanwhile, opening the layers control, and manipulating the etiquete or let´s call it label, I still didn´t see the symbols of the created points (it could happen that I use strange words to describe because I work with the spanish language version of mapinfo). Does anybody know where the big problem is? -- begin: vcard Sr. Sandy Marzella Flath Adr.I: Albergue Juvenil San Lorenzo de El Escorial C/Residencia Nº14 E-28200 San Lorenzo de El Escorial Tfn.: 0034 91 8 905 924 0034 687 791 167 Adr. II: DaimlerChrysler España, S.A. Asesoría Económica Red Avenida Bruselas, 30 28108 Alcobendas (Madrid) España Tfno: +34 91 484 61 03 Fax: +34 91 484 61 29 Adr.III: Fam. Beck c/o Sandy Flath Am Fuchsbau 11 A D-64319 Pfungstadt Tel.: 0049 (0) 61 57 - 86 536 Mob.: 0049 0 176- 511 301 72 email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] end:vccard Echte DSL-Flatrate dauerhaft f?xFC;r 0,- Euro*. Nur noch kurze Zeit! Feel free mit GMX DSL: http://www.gmx.net/de/go/dsl ___ 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] Setting Hourglass Cursor in MapBasic
I'm working on a MapBasic/Access hybrid application that uses DDE to communicate between the applications. A key element in the design is that MapInfo is not directly linked to any Access tables, but because of this independence sometimes when a process is started in Access (e.g. display some data in a form) it takes more than a few seconds to complete. Meanwhile, the user is looking at a MapInfo interface wondering what, if anything, is happening since he clicked on the map feature or menu to display some informaiton in a dialog form. So I need some way to alert the user that the process is actually working in the background and to just sit tight until the expected result happens. Typically you do this by changing the cursor to an hourglass and disabling cursor clicks. Does anyone know a way to do this in MapBaisc? Is this a job for Windows API functions or is there a simpler way? TIA, - Bill Thoen ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] Created points are not shown on the map
Hi Sandy It looks like you might be passing to MapInfo the numeric values direct from the NMEA sentences of your GPS. These values are degrees and decimal minutes without separators. For example the value you have shown of: 35457900 would be 35 degrees 45.7900 minutes. MapInfo would expect to see this in decimal degrees - so for example in above you would need to divide the 45.79 by 60 and add this to degrees to get 35.76317. Regards Bob Young www.MapsByDesign.co.uk - Original Message - From: Sandy Flath To: mapinfo-l@lists.directionsmag.com Sent: Wednesday, August 02, 2006 2:35 PM Subject: [MI-L] Created points are not shown on the map Hello just a basic question. Christopher Brabante may already got this message.I´m a total newcomer:Why does the map not show my created points (they are GPS points and converted in decimal points like (+35457900 for e.g.) and I think I chose the right Longitude/Latitude Formate (wcs84).Meanwhile, opening the layers control, and manipulating the "etiquete" or let´s call it label, I still didn´t see the symbols of the created points (it could happen that I use strange words to describe because I work with the spanish language version of mapinfo).Does anybody know where the big problem is? -- begin: vcard Sr. Sandy Marzella Flath Adr.I: Albergue Juvenil "San Lorenzo de El Escorial" C/Residencia Nº14 E-28200 San Lorenzo de El Escorial Tfn.: 0034 91 8 905 924 0034 687 791 167 Adr. II: DaimlerChrysler España, S.A. Asesoría Económica Red Avenida Bruselas, 30 28108 Alcobendas (Madrid) España Tfno: +34 91 484 61 03 Fax: +34 91 484 61 29 Adr.III: Fam. Beck c/o Sandy Flath Am Fuchsbau 11 A D-64319 Pfungstadt Tel.: 0049 (0) 61 57 - 86 536 Mob.: 0049 0 176- 511 301 72 email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] end:vccard Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl ___MapInfo-L mailing listMapInfo-L@lists.directionsmag.comhttp://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] Floating Screen protractor
Title: Floating Screen protractor Greetings list, Does anyone know of a windows utility that will display a floating protractor that is able to be dragged arount the screen. I want to overlay this on a mapper window to choose bearings. I am aware of the Distance /Bearing mbx, but I need something that is always visible as I work. Any leads appreciated Regards Peter Doyle Mobile Coverage Delivery (Qld, Country) Radio Access Network Telstra Services 07 38871128 [EMAIL PROTECTED] The contents of the E-mail are strictly confidential. If you are not the intended recipient, any use, disclosure or copying of this E-mail (including any attachments) is unauthorised and prohibited. If you have received this E-mail in error, please notify Telstra (ABN 33 051 775 556) immediately by return E-mail and then delete the message from your system. ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
(RE: [MI-L] Created points are not shown on the map) is it WGS84?
A gps point collected nmea string like GGA looks like $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47WGS84 Lon and Lat is like01131.000,E Longitude 11 deg 31.000' E4807.038,N Latitude 48 deg 07.038' NYou would still need to convert to Deg decimalYour example does not have a decimal point and seems to be out of range for utm -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Sandy FlathSent: Wednesday, August 02, 2006 8:35 AMTo: mapinfo-l@lists.directionsmag.comSubject: [MI-L] Created points are not shown on the mapImportance: HighHello just a basic question. Christopher Brabante may already got this message.I´m a total newcomer:Why does the map not show my created points (they are GPS points and converted in decimal points like (+35457900 for e.g.) and I think I chose the right Longitude/Latitude Formate (wcs84).Meanwhile, opening the layers control, and manipulating the "etiquete" or let´s call it label, I still didn´t see the symbols of the created points (it could happen that I use strange words to describe because I work with the spanish language version of mapinfo).Does anybody know where the big problem is? -- begin: vcard Sr. Sandy Marzella Flath Adr.I: Albergue Juvenil "San Lorenzo de El Escorial" C/Residencia Nº14 E-28200 San Lorenzo de El Escorial Tfn.: 0034 91 8 905 924 0034 687 791 167 Adr. II: DaimlerChrysler España, S.A. Asesoría Económica Red Avenida Bruselas, 30 28108 Alcobendas (Madrid) España Tfno: +34 91 484 61 03 Fax: +34 91 484 61 29 Adr.III: Fam. Beck c/o Sandy Flath Am Fuchsbau 11 A D-64319 Pfungstadt Tel.: 0049 (0) 61 57 - 86 536 Mob.: 0049 0 176- 511 301 72 email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] end:vccard Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l