Archi Forum

Archi => Archi Development => Topic started by: gevaertw on June 04, 2015, 10:24:33 AM

Title: Bug? - importing data from CSV fails
Post by: gevaertw on June 04, 2015, 10:24:33 AM
I use the import function frequently, but every time I use it it is fingers crossed if the import will work or not.
the workflow is as following:
export existing model to CSV
open CSV in excel, modify, add ....
save as CSV
import in archi

usualy I get the error message: "file should contain element information"
After that no data is imported.

I can play with the file in notepad ++ notepad.exe or whatever, all ";" are on the right spot. Somethimes it works after copying the exact same characters in a new file and save this,  (but I don't know why) usualiy it does not.
Tried saving as UFT / ANSI..  nothing helps
Tried importing only the header + 1 line of csv data, this fails als well.

Ocasionaly I can successfully import elements, but I have never achieved to import properties, at this point I have to add 400 properties, manual is not realy an option.

Thanks.
Title: Re: Bug? - importing data from CSV fails
Post by: Jean-Baptiste Sarrodie on June 04, 2015, 11:38:11 AM
Hi,

Very strange...

Could you attach some sample file (some that work and some that dont) in order for us to test ?

Regards,

JB
Title: Re: Bug? - importing data from CSV fails
Post by: gevaertw on June 04, 2015, 11:58:42 AM
Fils attached

The importOK is a clean file from export, I can re-import it
The importNOK is the very same filefrom witch I removed all data exect the header and pasted the new data in it.  for this file I only used notepad.exe

Removed attachments since they contain customer info
Title: Re: Bug? - importing data from CSV fails
Post by: Jean-Baptiste Sarrodie on June 04, 2015, 12:46:52 PM
Could you also provide the elements and relations file those properties refer to? Without them I will not be able to even import the "ok" file ;-)
Title: Re: Bug? - importing data from CSV fails
Post by: Phil Beauvoir on June 04, 2015, 22:15:21 PM
Thanks J-B for taking a look at this  8)

I'll also take a look when all files are available.

Phil
Title: Re: Bug? - importing data from CSV fails
Post by: Phil Beauvoir on June 04, 2015, 22:21:53 PM
Quote from: gevaertw on June 04, 2015, 10:24:33 AM
usualy I get the error message: "file should contain element information"

You'll only see that message if the file name that you try to import does not end with "*elements.csv".

From the manual:

QuoteAt the very least, you need to provide a CSV file named "xxx-elements.csv" where the "xxx-" part of the file name is optional. If you also provide a relations file it needs to be in the format described above and named "xxx-relations.csv". If you also provide a properties file it needs to be in the format described above and named "xxx-properties.csv". Again, the "xxx-" part of the file name is optional. All three file names need to match - for example: "myname-elements.csv", "myname-relations.csv" and "myname-properties.csv".
Title: Re: Bug? - importing data from CSV fails
Post by: gevaertw on June 10, 2015, 08:27:12 AM
Thanks

I mis- interpreted that line as "the file should be there" not you need to select that file for import even if you want to update properties only.  It seems to work now for this import.