• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

category name length check

Messages
596
Country
us-california
as the title suggest
it would be nice to have a add attribute/if inside category (Column) name length check
there is a 10 character limit, anything beyond that gets truncated
 
I don't understand what you mean. Can you give an example?
 
sure,
ADDATTRIBUTE|FTYPE=POLYGON;FROMFILE=landuse.shp;type=commercial;FAREA<1000;FAREA>99|COMMAREACAT|1

is truncated when checked in QGIS

# classify commercial area by size and split to categories
ADDATTRIBUTE|FTYPE=POLYGON;FROMFILE=landuse.shp;type=commercial;FAREA<1000;FAREA>99|COMAREACA|1

new column has a 10 character limit for title
 
Let me check, but I think it's a shp limitation. Of course it doesn't apply to all formats used. Also internally scenproc has no limitations.
 
i think you're right (as usual) :)
it may be only QGIS limit, because i can see scenProc pulling the right data regardless
 
It's a limitation of the shp format I think.
 
Hi,

I double checked and it is indeed a limitation of the SHP format. So there is nothing I can do about this.

If you import data form a shapefile you can truncate the names in your script, so that they match what is in the file.

I can't influence how they are written to the shapefile, the format simply doesn't allow longer names. If it is important that they appear correctly in the shapefile you should pick a different attribute name. Or use another file format to store the data.
 
Thank you for that Arno
can you add a check that just reminds us that the name is long
it happened to me with a simple category name like COMMAREACAT i didn't notice its 11 characters
then later my script is looking for an attribute thats been truncated
 
But within the same script it is never truncated. It will keep the same name.

Only after export that happens. But it makes no sense to export some data and then import it into the same script, since the data is there already.

When importing from shp you would have to use the names as in the shp for testing attributes.

Adding a warning for each attribute over 10 characters will give loads of false warnings for many attributes that are never exported to shp. Only place it would make some sense is in the export shp step.
 
In the last development release I have added the warning on SHP export when attribute names are truncated due to the SHP file limitation.
 
Back
Top