Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Chris.Jones2 on April 20, 2018, 01:27:55 am

Title: Import from CSV : Getting Elements to appear in specific Packages
Post by: Chris.Jones2 on April 20, 2018, 01:27:55 am
I am importing New Packages, Notes and Class Elements from a CSV file.
GUID column is empty.
I have all the standard headings.
[Name, Type, GUID, Notes, Phase, Version, Priority, Stereotype, Fully Qualified Stereotype, Language, Author, Scope, Alias, Status, Complexity, Keywords, Is Abstract, Is Leaf, Is Root, Is Specification, Requirement Difficulty, Requirement Priority, GenFile, Profile, Metatype]
{Bolded text above denotes populated cells}

I have structured the CSV so that the Package is followed by the Note and Class Elements that I want to appear in that package, in the order I want them to appear in the Model.
So the CSV record is arranged like this
Package 1
Note 1.1
Class Element 1.1
Class Element 1.2
Class Element 1.3
....
....
Package 2
Note 2.1
Class Element 2.1
Class Element 2.2
Class Element 2.3
....
....

... and so on.

The Import works BUT it presents all the packages first, and then the all Class Elements in alphabetical order of the Class Element Name.

How do I present the CSV so that it puts the Class Elements into the packages in the order I require?

Thank you for your help.

CJ
Title: Re: Import from CSV : Getting Elements to appear in specific Packages
Post by: Nizam on April 20, 2018, 08:16:56 am
You need to set the 'Preserve Hierarchy' option and setting CSV_KEY and CSV_PARENT_KEY to achieve grouping in import. IMHO the best way is to run a CSV export from your model with packages and elements, and see how it is exported.


 
Title: Re: Import from CSV : Getting Elements to appear in specific Packages
Post by: VKN on April 20, 2018, 11:09:50 am
And, without populating GUID column it won't work.