Geotechnical Modeler. Import *.csv files

Geotechnical Modeler. Import *.csv files

carlos.novalFUC49
Participant Participant
3,394 Views
17 Replies
Message 1 of 18

Geotechnical Modeler. Import *.csv files

carlos.novalFUC49
Participant
Participant

PROBLEMS TO IMPORT .CSV FILES

I am trying to import the data from the holes into the .csv files indicated but I always get the following error:

 

Error Message... The following fields are not found: Geology Code 2 Please verify that the fields exist in the following file and that the fields are separated by commas. C:\Users\carlos.noval\OneDrive - TSK\Documents\001816_Kilombero_Almacen_Azucar\02_C3D_Geotech_Mod\Field Geological Descriptions.csv Error Details... System.Exception: The following fields are not found: Geology Code 2 Please verify that the fields exist in the following file and that the fields are separated by commas. C:\Users\carlos.noval\OneDrive - TSK\Documents\001816_Kilombero_Almacen_Azucar\02_C3D_Geotech_Mod\Field Geological Descriptions.csv en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.RetrieveFieldGeologicalDescriptionsFromCSV(String filePath) en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.ImportBoreholesFromCSV(String projectId, String projectName, String projectLocation, String csvFilesPath, String csCode) en Aecc.Gtm.AutoCADPlugin.ManageData.ManageDataPresenter.ImportBoreholeDataFromFile()  

 

II attach the files used in case they can help me solve the error

0 Likes
Accepted solutions (2)
3,395 Views
17 Replies
Replies (17)
Message 2 of 18

Matheus-Lima
Advisor
Advisor

Hi @carlos.novalFUC49!

Take a look at the Easting and Northing in Location Details, "278.845.368" or something like that may lead to bugs. Try using only one decimal separator, like "278845.368". The borehole type you may define as "BH" for borehole or else, this is the category of the holes.

Also, in the Field Geological Descriptions.csv, "Geology Code2" is the name of the field. You may modify it to "Geology Code 2". That is the reason for the error message (YES, I hate those things too 😆). You may check your legend code values as well.

Hope it helps and let us know if does not work!

[PT-BR] Se essa postagem foi útil para você, clique em Curtir! Se a resposta resolveu o seu problema, clique em Aceitar Solução.
[EN-US] If it was helpful to you, click on Like! If the answer solved your problem, click on Accept Solution.

EESignature


Matheus Lima
Civil Engineer | BIM for Infrastructure Enthusiast | BIM Manager | Instagram @bim_infra | LinkedIn
Message 3 of 18

carlos.novalFUC49
Participant
Participant

Hello Matheus,
Thank you for the solution sent. But, having made the changes you indicate, the import of csv files still does not work.
Now I get this error:

Error Message...

An unknown error occurred on line 2 while reading data from the following file.
C:\Users\carlos.noval\OneDrive - TSK\Documents\001816_Kilombero_Almacen_Azucar\02_C3D_Geotech_Mod\Field Geological Descriptions.csv


Error Details...

System.Exception: An unknown error occurred on line 2 while reading data from the following file.
C:\Users\carlos.noval\OneDrive - TSK\Documents\001816_Kilombero_Almacen_Azucar\02_C3D_Geotech_Mod\Field Geological Descriptions.csv ---> System.IndexOutOfRangeException: Índice fuera de los límites de la matriz.
en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.RetrieveFieldGeologicalDescriptionsFromCSV(String filePath)
--- Fin del seguimiento de la pila de la excepción interna ---
en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.RetrieveFieldGeologicalDescriptionsFromCSV(String filePath)
en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.ImportBoreholesFromCSV(String projectId, String projectName, String projectLocation, String csvFilesPath, String csCode)
en Aecc.Gtm.AutoCADPlugin.ManageData.ManageDataPresenter.ImportBoreholeDataFromFile()

 

I don't understand what error you are referring to in line 2. There are no decimals in the numbers and I cannot detect the error you are referring to.
I would be grateful if you could tell me how to solve it.
Thank you very much.

0 Likes
Message 4 of 18

ChicagoLooper
Mentor
Mentor

Hello @carlos.novalFUC49 

In Field Geological Descriptions.csv keep the column named Legend Code, keep only the heading in row 1 named Legend Code but delete all the numbers in that column.

What happens?

 

For additional information, you may download Templates, additional reading material and sample drawings >>HERE<<. 

 

1001.png

 

 

  

Chicagolooper

EESignature

0 Likes
Message 5 of 18

carlos.novalFUC49
Participant
Participant

Hello:

Thank you for your reply. I did what you indicated but the same thing keeps happening. I get this error:

 

Error Message...

An unknown error occurred on line 2 while reading data from the following file.
C:\Users\carlos.noval\OneDrive - TSK\Documents\001816_Kilombero_Almacen_Azucar\02_C3D_Geotech_Mod\Field Geological Descriptions.csv


Error Details...

System.Exception: An unknown error occurred on line 2 while reading data from the following file.
C:\Users\carlos.noval\OneDrive - TSK\Documents\001816_Kilombero_Almacen_Azucar\02_C3D_Geotech_Mod\Field Geological Descriptions.csv ---> System.IndexOutOfRangeException: Índice fuera de los límites de la matriz.
en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.RetrieveFieldGeologicalDescriptionsFromCSV(String filePath)
--- Fin del seguimiento de la pila de la excepción interna ---
en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.RetrieveFieldGeologicalDescriptionsFromCSV(String filePath)
en Aecc.Gtm.DomainPersistence.Importers.CSVDataImporter.ImportBoreholesFromCSV(String projectId, String projectName, String projectLocation, String csvFilesPath, String csCode)
en Aecc.Gtm.AutoCADPlugin.ManageData.ManageDataPresenter.ImportBoreholeDataFromFile()

 

I will consult the link provided with the help documentation and redo the exercise to see if I can import the data again.

 

 

0 Likes
Message 6 of 18

Matheus-Lima
Advisor
Advisor
Accepted solution

Hi @carlos.novalFUC49.

The previous problem related was this one. Some Easting and Northing values with a lot of "." and some with just one "." (that is correct).

matheuslimaeng_0-1661869762611.png

 

I can see that you solved that by looking at your last sent files.

The last detail now is with the Legend Code in Field Geological Descriptions.csv. In your file, the codes are "100" and "200". As the codes are based on AGS standards, there are no "100" and "200", as you may check here (page 74): https://www.ags.org.uk/content/uploads/2020/11/Electronic-Transfer-of-Geotechnical-Data-3rd-Edition-....

Therefore, you may substitute the "100" and "200" inputs with any code accepted by AGS, like "101" and "201". These codes are associated with colors, but you can change them in Civil 3D after import. Geotechnical Modeler accepts even if all strata have the same legend code, the condition is that this code is within AGS's table.

I edited here substituting with "101" and "201" and it worked just fine! You may change it in the best way to suit your needs. Files attached!


[PT-BR] Se essa postagem foi útil para você, clique em Curtir! Se a resposta resolveu o seu problema, clique em Aceitar Solução.
[EN-US] If it was helpful to you, click on Like! If the answer solved your problem, click on Accept Solution.

EESignature


Matheus Lima
Civil Engineer | BIM for Infrastructure Enthusiast | BIM Manager | Instagram @bim_infra | LinkedIn
Message 7 of 18

ChicagoLooper
Mentor
Mentor
Accepted solution

@carlos.novalFUC49 

With the limited information you've provided, it's hard to evaluate your problem. If you upload your files, Locations Details.csv and Field Geological Descriptions.csv, then the forum might have a better chance of resolving your issue.

 

The file named Orientation and Inclination.csv is not mandatory so try it again without the orientation file. Also, double check your csv format when saving Locations and Field Geo Description files. There is more than one type of csv extension. Try using this one:

2001.png

Chicagolooper

EESignature

Message 8 of 18

lim.wendy
Alumni
Alumni

Hi @carlos.novalFUC49,

 

Welcome to the forum, and thanks for posting. @Matheus-Lima has provided a clue as to why this is not working due to your code's name, and @ChicagoLooper suggested trying it without the orientation file.

Have you got a chance to try them?

Remember to mark your posts as having an "Accepted Solution" if a solution is found as it helps other forum users with the same issue – so don't be shy about marking it as a solution! Accepted solutions get viewed more and help more users find the answer to their problems.

 

 



Wendy Lim

Data Nerd | Community Advocate | AEC Industry


facebook twitter twitter blogs pm


Join the new online Rail Community


Rails Summit




Message 9 of 18

carlos.novalFUC49
Participant
Participant
I used this option, but kept giving me the same mistake

Thanks for you support
0 Likes
Message 10 of 18

j.ayalaCJF2S
Explorer
Explorer

This is the error I keep getting when trying to import a CSV into Geo modeler. Running 23 with current updates.

 

Error Message...

An item with the same key has already been added.


Error Details...

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Aecc.Gtm.Domain.CustomCSV.Record.CreateFromFields(List`1 fieldNames, List`1 recordFields)
at Aecc.Gtm.DomainPersistence.Importers.CustomCSVDataImporter.RetrieveDataFromFile(String customCsvFilePath, String fieldDelimiter, String textFieldQualifier, ProjectData& projectData, CustomCsvTableType tableType, String& error)
at Aecc.Gtm.DomainPersistence.Importers.CustomCSVDataImporter.ImportBoreholesFromCustomCsvData(Project projectInfo, FieldMapConfiguration fieldMapConfig)
at Aecc.Gtm.AutoCADPlugin.ManageData.ManageDataPresenter.ImportBoreholeDataFromCustomCSV()

0 Likes
Message 11 of 18

Matheus-Lima
Advisor
Advisor

Hi @j.ayalaCJF2S.

I downloaded your files here, apparently, there are some blank columns in your CSV that might be the problem. I deleted them and managed to import the data.

MatheusLima_0-1667002232784.png

 

I deleted some commas after "GeologyCode" using substitute ",,,,,," to "".

Before

MatheusLima_1-1667002494236.png


After

MatheusLima_2-1667002685357.png


With the command GM_DELETEPROJECT you may delete other projects with similar data. Also, a suggestion, change the column names and file names according to the Autodesk Sample files, this way you won't need to map the fields everytime. Or save a field name configuration.

With the Geology file I'm sending here, I imported the data. The same error appeared to me and nothing was imported. I created a new drawing in Civil 3D, came back to the first drawing and the boreholes were there 🤔

I think this is a bug or something.

[PT-BR] Se essa postagem foi útil para você, clique em Curtir! Se a resposta resolveu o seu problema, clique em Aceitar Solução.
[EN-US] If it was helpful to you, click on Like! If the answer solved your problem, click on Accept Solution.

EESignature


Matheus Lima
Civil Engineer | BIM for Infrastructure Enthusiast | BIM Manager | Instagram @bim_infra | LinkedIn
Message 12 of 18

j.ayalaCJF2S
Explorer
Explorer

Your modified geology file worked! And was able to import! Thank you for your help!

Message 13 of 18

ChicagoLooper
Mentor
Mentor

Hi @j.ayalaCJF2S 

 

You'll need to edit your files that uploaded in Post #10 of this thread.

100.png

 

Chicagolooper

EESignature

Message 14 of 18

Matheus-Lima
Advisor
Advisor

Good to know, @j.ayalaCJF2S! I noticed this issue pointed out by @ChicagoLooper only in BH13. I didn't see the other one and I forgot to include this matter in the post. It is important as he said to match the final depth between the files.

 

Best regards and keep up the good work 🙂

 

[PT-BR] Se essa postagem foi útil para você, clique em Curtir! Se a resposta resolveu o seu problema, clique em Aceitar Solução.
[EN-US] If it was helpful to you, click on Like! If the answer solved your problem, click on Accept Solution.

EESignature


Matheus Lima
Civil Engineer | BIM for Infrastructure Enthusiast | BIM Manager | Instagram @bim_infra | LinkedIn
0 Likes
Message 15 of 18

j.ayalaCJF2S
Explorer
Explorer

Got the CSV files corrected and they imported just fine. But why when I build out the surfaces by either legend or geology code, I only get these 4 surfaces and many holes with no surface tying to them?

 

Screenshot 2022-11-02 112747.png

0 Likes
Message 16 of 18

Matheus-Lima
Advisor
Advisor

Hi @j.ayalaCJF2S, make sure each Legend Code / Geology Code has at least three samples so Civil 3D triangulates them as a surface. The more codes you have, the bigger the probability of an issue. These stratum surfaces are very simple, they are just a linear connection between the layers. 

[PT-BR] Se essa postagem foi útil para você, clique em Curtir! Se a resposta resolveu o seu problema, clique em Aceitar Solução.
[EN-US] If it was helpful to you, click on Like! If the answer solved your problem, click on Accept Solution.

EESignature


Matheus Lima
Civil Engineer | BIM for Infrastructure Enthusiast | BIM Manager | Instagram @bim_infra | LinkedIn
0 Likes
Message 17 of 18

boldenownb68
Participant
Participant

try opening the csv file in notepad. You get diff results than excel

0 Likes
Message 18 of 18

boldenownb68
Participant
Participant
I'm getting the same message. Can't get past this point.
0 Likes