MapWindow 4 - ActiveX Control Programming : MapWindow Discussion Forum
Hello. I have a problem when I tried to watch the attribute table. The program show the following error "The field name 'alt_1' already exits in the Attribute Table. This field must be renamed before displaying the table. Do you wish ro rename the field to 'alt_1_1'?"
Problem with fields!!
Posted by:
truxky ()
Date: May 11, 2011 02:57AM
Hello.
I have a problem when I tried to watch the attribute table. The program show the following error "The field name 'alt_1' already exits in the Attribute Table. This field must be renamed before displaying the table. Do you wish ro rename the field to 'alt_1_1'?"
This attribute isn´t in the table previosly. The fields of the shapefile are created by me.
I am using C# for development and MapWindow GIS to visualize the attributes
I hope you can help me.
Thank you very much
I have a problem when I tried to watch the attribute table. The program show the following error "The field name 'alt_1' already exits in the Attribute Table. This field must be renamed before displaying the table. Do you wish ro rename the field to 'alt_1_1'?"
This attribute isn´t in the table previosly. The fields of the shapefile are created by me.
I am using C# for development and MapWindow GIS to visualize the attributes
I hope you can help me.
Thank you very much
Re: Problem with fields!!
Posted by:
sindizzy ()
Date: May 12, 2011 11:30AM
You show no code so its impossible to see what you are doing.
AGP
AGP
Re: Problem with fields!!
Posted by:
pmeems ()
Date: May 12, 2011 04:24PM
Is perhaps the name of the field longer that 8 characters?
Field names are chopped of when saving the changes.
So 'Altitude_old' and 'Altitude_new' will result in twice 'Altitude'.
When the attribute table is opened this is checked and then your are prompted.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Field names are chopped of when saving the changes.
So 'Altitude_old' and 'Altitude_new' will result in twice 'Altitude'.
When the attribute table is opened this is checked and then your are prompted.
--
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: Problem with fields!!
Posted by:
truxky ()
Date: May 13, 2011 12:25AM
Thanks for the reply but I haven´t another field with this name.
My code is as follows:
MapWinGIS.Table tTabla = new MapWinGIS.Table();
tTabla.StartEditingTable(null);
int iIndiceCampos = 1;
//Deployment
MapWinGIS.Field miCampo1 = new MapWinGIS.Field();
miCampo1.Name = "lugar";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 15;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//SensorStation
miCampo1.Name = "localiz";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 20;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Radar
miCampo1.Name = "radar";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 2;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//TypeSensor
miCampo1.Name = "tipo_sens";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//TradeMark
miCampo1.Name = "marca";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Model
miCampo1.Name = "modelo";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Latitude
miCampo1.Name = "latitud";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Longitude
miCampo1.Name = "longitud";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Altitude
miCampo1.Name = "alt_1";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
miCampo1 = null;
I don´t know what happen.
Thank you very much
My code is as follows:
MapWinGIS.Table tTabla = new MapWinGIS.Table();
tTabla.StartEditingTable(null);
int iIndiceCampos = 1;
//Deployment
MapWinGIS.Field miCampo1 = new MapWinGIS.Field();
miCampo1.Name = "lugar";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 15;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//SensorStation
miCampo1.Name = "localiz";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 20;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Radar
miCampo1.Name = "radar";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 2;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//TypeSensor
miCampo1.Name = "tipo_sens";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//TradeMark
miCampo1.Name = "marca";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Model
miCampo1.Name = "modelo";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Latitude
miCampo1.Name = "latitud";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Longitude
miCampo1.Name = "longitud";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
iIndiceCampos++;
//Altitude
miCampo1.Name = "alt_1";
miCampo1.Type = MapWinGIS.FieldType.STRING_FIELD;
miCampo1.Width = 10;
shp.EditInsertField(miCampo1, ref iIndiceCampos, null);
miCampo1 = null;
I don´t know what happen.
Thank you very much
Sorry, only registered users may post in this forum.


