Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Dermot

Pages: 1 ... 35 36 [37] 38 39 40
In terms of the nesting of Model Documents, that is not currently supported, however Elements (model Document Elements) can be "Copied" to other packages (Master Documents):
Select multiple Elements in a diagram:
 - Edit | Copy
 - Go to a new package/diagram
 - Edit | Paste Elements | As New
(Note: 841 - it doesn't work for a single selection - but I have submitted a bug report)

There is a full VB 6 program and code available for generating documents.  For the code see:

There is a routine in this - PasteDiagram() that is a good example.

The Word/OpenOffice: Compare and Merge (not Track Changes) can be used to show differences between two RTF reports of different Baselines.  This can be good for Viewing/reporting of these differences.  

Automation Interface, Add-Ins and Tools / Re: Customizing Table of Contents
« on: December 05, 2008, 03:39:03 pm »
EA RTF reporting is setup to work with the incremented Heading Fonts. These are incremented for each level of Package/Element that is parsed. If you want to set this as a fixed increment you can try either:
 - In the Contents Area - Change the line with the {} field from a Heading font to a Normal font.
 - Setting: F8 | Advanced | Adjust Heading Levels - to heading 2 - to restrict the incrementation.
- You can set up a TOC in a Word document with levels set to 2 and import this as a starter for a new template in EA.

I would suggest you have a look at more details on this in the Whitepaper on RTF report generation available from:

I am not sure if I read the original post correctly - when reffering to formating in the notes is that EA rich text formating?  If so, try using the EA-SDK routines:
GetFieldFromFormat (string Format, string Text)
GetFormatFromField (string Format, string Text)
See the help for details.

Pardon me butting in without reading all of Midnight's very generous reply, but here is some VB code that I think does do what you want - see pasteDiagram():

Sub DumpDiagrams(Package As Object, Ratio As Integer, bBorder As Boolean, ElementId As Long, Header As Boolean)

'Dump Diagrams
    Dim idx As Integer, diag As Ea.Diagram
    For Each diag In Package.Diagrams
        ' Check if the diagram is directly under the package - don't print if not
        If diag.ParentId = ElementId Then
             If Header Then
                 ' get the Package name and comments
                 WriteLin diag.Name, False, False, "H2"
                 WriteLin diag.Notes, False, False, "NS"
             End If
             ' Place the diagram on the document
             PasteDiagram diag.DiagramGUID, Ratio, bBorder

             WriteLin "Figure " + Str(iFigure) + ": " + diag.Name, True, False, "NS"
             iFigure = iFigure + 1
             EaRepos.CloseDiagram (diag.DiagramID)
        End If
    Set diag = Nothing
End Sub

Public Sub PasteDiagram(sDiagGuid As String, Ratio As Integer, bBorder As Boolean)

    Dim oProject As Ea.Project
    Dim CurrRange As Range
    Set CurrRange = WordApp.ActiveDocument.Content
    CurrRange.Collapse Direction:=wdCollapseEnd
    ' set up a project object to retrieve the graphics
    Set oProject = EaRepos.GetProjectInterface()
    'Copy diiagram from EA to the Clipboard
    ' Paste this diagram to the document from the project Object using guid from package
    If oProject.PutDiagramImageOnClipboard(sDiagGuid, 0) Then
    End If
    If Ratio > 0 Then
        ' Selection.InlineShapes(1).Height * (Ratio / 100)
        WordApp.ActiveDocument.InlineShapes(iFigure - 1).LockAspectRatio = True
        WordApp.ActiveDocument.InlineShapes(iFigure - 1).Width = WordApp.ActiveDocument.InlineShapes(iFigure - 1).Width * Ratio
    End If
    If bBorder Then
        WordApp.ActiveDocument.InlineShapes(iFigure - 1).Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
        WordApp.ActiveDocument.InlineShapes(iFigure - 1).Borders(wdBorderLeft).LineStyle = wdLineStyleSingle
        WordApp.ActiveDocument.InlineShapes(iFigure - 1).Borders(wdBorderRight).LineStyle = wdLineStyleSingle
        WordApp.ActiveDocument.InlineShapes(iFigure - 1).Borders(wdBorderTop).LineStyle = wdLineStyleSingle
    End If
    Set oProject = Nothing
    Set CurrRange = Nothing

End Sub

The full code for this is downloadable from the main Sparx web site dealing with Automation code:

I can't seem to reproduce this - using the standard Master template and generating it with sub-reports the results allow comments in Word where ever the cursor is placed (except on the exterior of a table).
I would suggest you send through a copy of this to the support email for reveiw.

This can be done in a Virtual Document - using a Model Element with a Tagged Value: SearchName &  SearchValue - see the help on Virtual Documents or the Whitepaper on RTF reporting. Requires EA 7.1.

Automation Interface, Add-Ins and Tools / Re: Sequence diagram
« on: September 18, 2008, 03:23:19 pm »
If you have code that you are running under EA's Build, Test & Run then Sequence diagrams can be generated from this - see:
Is that what you are asking for?

I would suggest you have a look at the whitepaper on RTF report gerneation - see the section on Numbering.   The List numbering by default sets 1.0 rather than 1.1 - there is a note in this section:
[Note: As the heading fonts are incremented for nested packages, if a 1.1.1 starter is required rather than 1.0.0, then the List Levels properties | Start At needs to be set for or all list levels.]
For the whitepaper see:

Automation Interface, Add-Ins and Tools / Re: importing requirements
« on: August 05, 2008, 10:31:25 am »
If the other product supports XMI import/export - then is the best process to use, otherwse the CSV import/export is the other option to look at.  There are detail steps on using this in the whitepaper on Requirements Management - see:
There is also an Add-in available for importing DOORS data.

Automation Interface, Add-Ins and Tools / Re: RTF report
« on: July 24, 2008, 11:48:42 am »
There is no direct filtering on the sub-element level of the RTF report generation. If you want to filter at this level it may be best to look into creating a query in the Advanced Search (ctrl-F).

The standard figure numbering is a text field: Figure: {Diagram.Figure}.  This is not directly referenced by other elements. However if you are using Element with Linked Documents -  there is the option to create hyperlinks to the diagrams in the Linked Document - by dragging a diagram from the Project Browser to the linked Document.  If the diagram and the Linked Document are generated in the report then the hyperlink will reference the diagram (Same can be done for elements & Packages).  See EA's help: "Hyperlink From Linked Document".

"Is there any other way to achieve this functionlity in the new RTF editor? "
Yes - the Sections:
Package::Model Document   &
Element::Model Document
Both support the output of RTF data from Linked Documents and Document Artifact Elements.

Automation Interface, Add-Ins and Tools / Re: Diagrams in RTF Reports
« on: June 30, 2008, 04:54:11 pm »
Hello Jason,

The RTF generator is set by default to scale diagrams to the page if larger than a page.  7.1 does support an option in the Diagram Propoerties under the Diagram Tab : RTF Document Options | Divide Diagrams into multiple pages.  You can set this for larger diagrams to ensure scaling does not minimise the diagram.  
In terms long diagrams and of parts of the diagram being off the bottom of a page - there has been a correction for this - but I am not sure which build - you might try the latest build.
Otherwise I would suggest you send through examples to the support email address - see below.

Pages: 1 ... 35 36 [37] 38 39 40