Archi Forum

Archi => General Archi Discussion => Topic started by: Stanley on June 12, 2018, 22:00:39 PM

Title: ACLI not importing CSV
Post by: Stanley on June 12, 2018, 22:00:39 PM
Hi!

We are using Archi 4.2 ACLI with the following CL:

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash --loadModel Metamodel.archimate --csv.import elements.csv

receiving the messages:

[Core] Loaded model: 'Metamodel'
[CSV] Importing csv from elements.csv to 'Metamodel'
[CSV] CSV Imported!

However

elements.csv are not imported at all!

Are we missing something?
Title: Re: ACLI not importing CSV
Post by: Phil Beauvoir on June 12, 2018, 22:04:45 PM
How do you know that the file is not imported?

Please provide more information about what you expect to happen, and what actually happens.
Title: Re: ACLI not importing CSV
Post by: Jean-Baptiste Sarrodie on June 12, 2018, 22:23:34 PM
Hi,

You don't seem to use any option to actually save the model after importing the CSV.

Can you retry with a save ?

Regards

JB
Title: Re: ACLI not importing CSV
Post by: Phil Beauvoir on June 12, 2018, 22:24:24 PM
It's probably worth importing that csv file into Archi itself to see what's going on.
Title: Re: ACLI not importing CSV
Post by: Stanley on June 13, 2018, 14:16:46 PM
Quote from: Phil Beauvoir on June 12, 2018, 22:04:45 PM
How do you know that the file is not imported?

Please provide more information about what you expect to happen, and what actually happens.

Because the model has not the information provided in elements.csv.

Actually, we expected all the data in csv loaded into the model.
Title: Re: ACLI not importing CSV
Post by: Phil Beauvoir on June 13, 2018, 14:18:04 PM
> It's probably worth importing that csv file into Archi itself to see what's going on.

> You don't seem to use any option to actually save the model after importing the CSV. Can you retry with a save ?
Title: Re: ACLI not importing CSV
Post by: Stanley on June 13, 2018, 14:19:23 PM
Quote from: Jean-Baptiste Sarrodie on June 12, 2018, 22:23:34 PM
Hi,

You don't seem to use any option to actually save the model after importing the CSV.

Can you retry with a save ?

Regards

JB

Well, that could be the cause of the problem, how do I save it?
I found no option at the documentation.
Title: Re: ACLI not importing CSV
Post by: Phil Beauvoir on June 13, 2018, 14:20:19 PM
https://github.com/archimatetool/archi/wiki/Archi-Command-Line-Interface

--saveModel <*.archimate file>
Title: Re: ACLI not importing CSV
Post by: Stanley on June 13, 2018, 14:22:26 PM
Quote from: Phil Beauvoir on June 13, 2018, 14:18:04 PM
> It's probably worth importing that csv file into Archi itself to see what's going on.

> You don't seem to use any option to actually save the model after importing the CSV. Can you retry with a save ?

I did it, and by using the GUI it imported CSV without a glitch.
However, ACLI does not import it.
Title: Re: ACLI not importing CSV
Post by: Stanley on June 13, 2018, 14:27:26 PM
Quote from: Phil Beauvoir on June 13, 2018, 14:20:19 PM
https://github.com/archimatetool/archi/wiki/Archi-Command-Line-Interface

--saveModel <*.archimate file>

That was it!
It worked flawlessly!
Thank your very much!
Title: Re: ACLI not importing CSV
Post by: Stanley on June 13, 2018, 14:31:05 PM
Is there a way to import CSV keeping ANSI encoding?
Title: Re: ACLI not importing CSV
Post by: Jean-Baptiste Sarrodie on June 13, 2018, 14:33:10 PM
Hi,

Quote from: Stanley on June 13, 2018, 14:31:05 PM
Is there a way to import CSV keeping ANSI encoding?

Have you tested this:
--csv.exportEncoding <encoding>


Maybe worth reading this wiki page in depth ;-)

Edit: Maybe worth me reading your message in depth as obviously this option is for export while you're looking at import ;-)

Regards

JB
Title: Re: ACLI not importing CSV
Post by: Phil Beauvoir on June 13, 2018, 14:34:21 PM
Quote from: Stanley on June 13, 2018, 14:31:05 PM
Is there a way to import CSV keeping ANSI encoding?

Imported file to be UTF-8 encoding.
Title: Re: ACLI not importing CSV
Post by: Stanley on June 13, 2018, 15:36:54 PM
Quote from: Phil Beauvoir on June 13, 2018, 14:34:21 PM
Quote from: Stanley on June 13, 2018, 14:31:05 PM
Is there a way to import CSV keeping ANSI encoding?

Imported file to be UTF-8 encoding.

UTF-8 did not work but UTF-8 BOM did.