Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: survex on April 09, 2015, 12:38:29 am

Title: Import code from directory into different packages
Post by: survex on April 09, 2015, 12:38:29 am
Say I have code in Z:\code.

I'm adding package A in EA and import code from Z:\code into A - it works fine, great!
Then I add package B and import code from Z:\code into B - B remains empty.

So I can't add to same file as different classes in EA?
Is there any way to hack it?
Title: Re: Import code from directory into different pack
Post by: Eve on April 15, 2015, 09:42:03 am
What you are seeing is correct. EA will update the original elements instead of creating new ones.

The best "hack" I can think of is to create a local path before importing the first time. Before importing a second time, change the local path to point to a different location. This will tell EA that the classes it is seeing are different from the ones already there.
Title: Re: Import code from directory into different pack
Post by: survex on April 17, 2015, 08:15:18 pm
Thank you! I'm solving this problem in similar way, just creating symlink for each code importing in EA, e.g.
A -> A1 (symlink) -> import in EA package A1
A -> A2 (symlink) -> import in EA package A2