Home › Forums › eaDocX queries › How to copy sections
Home › Forums › eaDocX queries › How to copy sections
- This topic has 5 replies, 3 voices, and was last updated 9 years, 6 months ago by Heather Wallace.
-
AuthorPosts
-
8 May 2015 at 2:28 am #8076Barrie TreloarParticipant
This may be because I doing this wrong, so let me explain what I am trying to do.
I’m building a Solution Architecture Document against our existing templates which have a section on containing the Assumption, Constraints, and Architectural Principles.
What I want to do is to generate a table for each of these in the document.
So I have created one section to contain the Assumptions by creating a Profile section that works on the Requirements stereotyped as <
>. I’ve then created the table columns I am interested in.
As I am unable to find how to include table captions, I am doing that outside of eaDocX, hence one of the reasons for creating multiple sections.
Now that I am about to generate the next table for Constraints and it has a very similar table structure, I would like to copy the Assumptions section and modify it for Constraints.
But I am unable to find any way of doing this.
So I must manually configure a new table with essentially duplicate details as the first table.
One of the pain points is that the column “Source” is taken from the relationship of an attribute and this takes more clicking to setup than the other simple columns do.Admittedly if I had spent the same amount of time as it took to write this post I would have already been done duplicating the tables… but that goes against my sensibilities and learning whether there is a better way will help in future document creation.
Is there a way to copy sections?
Or should I be solving this problem in a different way?
Cheers
Barrie8 May 2015 at 9:36 am #8077eadocX SupportParticipantHi Barrie,
You are quite correct that there is currently no way to copy a “section” – in your case, I think you mean a Profile for a particular EA Element type: Assumption to Constraint. That’s because for each kind of Element, EA can have slightly different information. So for any pair of element types, it’s hard to ‘copy’ the profile of one to the other, as their might be missing or extra EA attributes.
Where we can reliably do this, we do. So, for example, if you have a Profile for an element type, you can copy that profile to a stereotype of that element, because in this case we can be sure they share the same EA attributes.
As for the table captions, this question has been asked a couple of time already, but I’ll repeat the answer for completeness.
The challenge for eaDocX is simple: where does the text for the caption come from?When eaDocX prints a table, it does that because you have defined a ‘table’ profile. So, eaDocX collects together all the EA elements of that type, and prints them in a table. But where does the caption come from? Not in any one of the elements – you might delete it, or print it in another document as ‘inline’. And not in the Profile: that may get used many times in the same document for different tables.
The way I usually avoid this problem is to:
- Always try to have elements of the same type in a single EA Package. So I avoid packages with, say, Requirement and Use Case elements
- Put some text into the Notes of this parent Package, which will print usually above the table of the children of the package. Nearly a table caption.
Thanks
26 May 2015 at 7:10 am #8078Barrie TreloarParticipantThanks for the stuff about table captions. I’ll just live with manually adding those then, as package notes look ugly and won’t get added into Word’s Table of Figures.
Hi Barrie,
You are quite correct that there is currently no way to copy a “section” – in your case, I think you mean a Profile for a particular EA Element type: Assumption to Constraint. That’s because for each kind of Element, EA can have slightly different information. So for any pair of element types, it’s hard to ‘copy’ the profile of one to the other, as their might be missing or extra EA attributes.Well both would be great! But section is what I want to copy.
(While fiddling to write this up, I see that you are correct when I want to copy a Profile and not a Section. A section does not control the look of its output, it just contains the EA elements that will be included in that section. The look is controlled by the Profile, which is what I want to copy.)Assumption and Contraint are both stereotypes of Requirement, and they display the same as a 3 column table. The only difference is that one column is named either “Assumption” or “Constraint”, and they work on their specific stereotype of Requirement.
When I want to create the next stereotype of Requirement for “Principles”, I want to use the formatting from Assumption and make minor adjustments. As noted below, I can find no way to make this duplications and because it has an attribute of releated element it means redefining that relationship. This is all doable, just tedious.
Where we can reliably do this, we do. So, for example, if you have a Profile for an element type, you can copy that profile to a stereotype of that element, because in this case we can be sure they share the same EA attributes.
How do you do this? I’ve tried the following:
1) Create the basic information in the parent element. In this case “Requirement” which I’ve left as inline format for testing, and added the “Alias” beneath the already existing “Name”.
2) When I then right click on the Profile for Requirement and select Create new stereotype, and select a new stereotype the Summary section has nothing listed in it; no Name, no Alias.
3) If I try “Create new stereotype” from a stereotype, say “Assumption”, then nothing happens. I dont get any window for more information.
4) Right clicking on “Assumption” offers me no option to “copy”.
26 May 2015 at 3:53 pm #8079eadocX SupportParticipantSo, having established we are talking about copying of Profiles, not sections….:-)
– If you have a profile defined for a non-stereotyped element, if you then choose to create a profile for a stereotype of that element, eaDocX will default to copying the profile for the non-stereotyped element into the stereotyped one. On the basis that they are likely to be ‘similar but different’
– to copy profiles from one element type to another, you can edit the Profile xml:
1. Save the Profile to a file, from the eaDocX File menu
2. Edit the Profile XML. Each attribute of each element type/stereotype has a line in the profile like:
PLEASE take a backup of your documents before trying this: this is un-documented, non-public function, so you’re doing this at you own risk!
Thanks
27 May 2015 at 12:00 am #8080Barrie TreloarParticipantSo, having established we are talking about copying of Profiles, not sections….:-)
– If you have a profile defined for a non-stereotyped element, if you then choose to create a profile for a stereotype of that element, eaDocX will default to copying the profile for the non-stereotyped element into the stereotyped one. On the basis that they are likely to be ‘similar but different’
Those were the steps I tried and it didn’t work (and wrote up in the previous reply). I didn’t bother sending a screenshot for the failed page, I just described that those fields were missing.
I just tried it with a completely new element “Actor” in the hopes it was a bug where already existing stereotypes caused it to not copy the parent profile. And I get the same outcome – the stereotyped profile shares nothing in common with the parent except the style (Inline or Table), and fields defined in the parent do not exist in the stereotyped child.
I’m currently using eaDocX 3.2.1.1
– to copy profiles from one element type to another, you can edit the Profile xml:
1. Save the Profile to a file, from the eaDocX File menu
2. Edit the Profile XML. Each attribute of each element type/stereotype has a line in the profile like:
PLEASE take a backup of your documents before trying this: this is un-documented, non-public function, so you’re doing this at you own risk!
Ahh danger!
I’ll give that way a go 😛
I dont have any elements that need copying yet, so I’ll report back when I do.- This reply was modified 9 years, 6 months ago by Barrie Treloar.
27 May 2015 at 7:15 am #8082Heather WallaceParticipantI’ve had to resort to this approach when I’ve run into version control issues i.e. some good profiles in one profile xml and others in another. It can be a quick way to achieve what you need, but definitely heed the warnings – it’s very easy to corrupt the xml.
Heather
-
AuthorPosts
- You must be logged in to reply to this topic.
Download a free trial
Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.
Download