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 - mrf

Pages: 1 [2] 3 4 ... 21
16
We currently have no official profile/technology for ORM, however the tools are available within EA to develop one if you felt inclined.

Please consult the following help topics for more information:

UML Profiles: http://www.sparxsystems.com/uml_tool_guide/extending_uml/umlprofiles.html
UML Patterns: http://www.sparxsystems.com/uml_tool_guide/extending_uml/umlpatterns.html
Shape Scripts: http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/shape_editor_2.html
MDG Technologies: http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/mdgtechnologies_2.html
Enterprise Architect SDK: http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/introduction_2.html

17
Suggestions and Requests / Re: Feature Visibility: Version
« on: April 01, 2010, 12:49:24 pm »
While not directly satisfying this requirement, two options spring to mind about how you could achieve something similar:

1. Create a shapescript using the HasProperty function
2. Use diagram filters (Version 8) to render elements that are not at a given version differently (eg faded, greyscale).

18
Suggestions and Requests / Re: Black Box
« on: February 05, 2010, 09:00:17 am »
Crashes are treated with the highest priority here and we are always keen to resolve them as soon as we can.

If you encounter a crash, then the most important pieces of information you can give us are:

1. The memory address of the crash (available from the standard Windows "An error has occured" dialog. I think it's under View error report contents somewhere)
2. What version/build of EA you are using
3. What you were doing at the time when the crash occured

From there we can perform some forensic analysis, checking the instructions at the particular memory address you've given within the context of what you were doing at the time.

19
Suggestions and Requests / Re: v8 - Hyperlinked Notes
« on: February 11, 2010, 04:44:16 pm »
I think I Ctrl+Click should execute it in most situations (It's not my area, so feel free to tell me if I'm wrong).

20
Suggestions and Requests / Re: Version 8
« on: February 09, 2010, 09:03:06 am »
Quote
I just invoked the Layout Manager. It sent EA to an endless loop. That's too beta for me....

Diagram Layouts or Workspace Layouts?

Some more details would be appreciated if you can spare the time.

21
Suggestions and Requests / Re: Enterprise-wide Model Searches
« on: February 01, 2010, 04:34:17 pm »
You can also perform automation interface based searches via scripts. See the provided scripts for some examples:

* VBScript - Model Search (Attributes) Example
* VBScript - Model Search (Operations) Example
* JScript- Model Search (Attributes) Example
* JScript- Model Search (Operations) Example

EDIT: Script templates may make an appearance in the next build of EA  :-X

22
Suggestions and Requests / Re: Layers
« on: December 31, 2009, 12:09:52 pm »
Quote
Is this effectively laying one diagram on top of another?

Not really, it's intended to provide filtered views of an existing diagram.

Quote
Are you able to give any broad indication of functionality?

Only what I've stated above. If, hypothetically, the beta were to become available early in the New Year you could possibly evaluate it then ;D.

23
Suggestions and Requests / Re: Layers
« on: December 31, 2009, 08:48:06 am »
Hi Steve,

I can confirm that functionality similar to what you describe is currently under development (and looking very useful!). We intend to include it in a future build of Enterprise Architect.

24
Suggestions and Requests / Re: SSKeyStore tool
« on: January 25, 2010, 08:49:43 am »
I'd expect to hear an announcement about this in the near future. Improvements have been planned for version 8.0.

25
Suggestions and Requests / Re: Search Based on Diagram Selected
« on: December 21, 2009, 10:18:34 am »
At first glance I can't see why not, but I'd really need to chat to those who have said it can't be done and get a better understanding as to how they got to that opinion.

So I wouldn't rule it out for the future, but for the short term, "No, you can't have it" (Midnight, 2009).

26
Suggestions and Requests / Re: Search Based on Diagram Selected
« on: December 21, 2009, 09:32:11 am »
I've just had that chat with Neil myself and it turns out that I was misinformed. From what I understand now, the DiagramLinks collection won't have an entry for Connectors on the diagram that haven't been modified beyond their default settings.

We've had a chat about this, and came to the consensus that the DiagramLinks collection should contain all connector instances on the diagram, regardless of whether they are using their default settings or not. We came up with a fairly simple way to achieve this, so I'll look at getting it implemented ASAP.

27
Suggestions and Requests / Re: Search Based on Diagram Selected
« on: December 21, 2009, 08:44:36 am »
When interpreting the script, it is important to understand the role of the DiagramLink object. A connector has a one to many relationship with diagram (eg one connector may appear on many diagrams). Whereas a Connector object describes the relationship between two entities, the DiagramLink object represents an instance of a connector on a single diagram, and contains properties such as its geometry, visibility etc.

If it helps, a basic psuedocode of the script would be as such:

START
Construct an XML document that will be sent to the search window (This document will describe both the headings and the data that will be displayed)
Find the currently selected item in the tree
If it's a diagram:
    Get the collection of diagramlinks for the diagram
    For each diagramlink in the diagram
        Get the corresponding connector object for the diagramlink
        Add the connector's details to the search data (AddRow function)
Send the search data to the search window and display the results.
END

@wikitect
If you want to add/remove what data is displayed in the search report you must change two things:
1. The XML search template provided in the variable SEARCH_SPECIFICATION (this defines which headings are included in the search window).
2. The script method AddRow (this contains the logic for how the fields are populated). Currently it displays various bits of data for the Connector, Source and Target Objects. Each of these objects has autocomplete intellisense available, so you should easily be able to get a list of what data is available to you. If not, check out the Enterprise Architect SDK for Connectors (http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/connector2_2.html) and Elements (http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/element2.html).

@wikitect and Thelonius
As was mentioned above, the DiagramLink object describes an instance of a Connector on a diagram. The DiagramLink object (http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/diagramlinks.html) has a property called IsHidden which can be used to test whether the Connector is visible on the provided diagram. Therefore you could change the code at around line 88 to the following:

Code: [Select]
// Only process the diagram link if it is visible on the diagram.
if ( !currentLink.IsHidden )
{
      // Load the corresponding connector object for the link
      var correspondingConnector as EA.Connector;
      correspondingConnector = Repository.GetConnectorByID( currentLink.ConnectorID );

      // Add the connector's details to the search data
      AddRow( xmlDOM, node, correspondingConnector );      
}

I hope that helps, if you have any further questions, don't be afraid to ask!  8-)

28
Suggestions and Requests / Re: Search Based on Diagram Selected
« on: December 18, 2009, 04:17:43 pm »
Part 2 of 2:

Code: [Select]
/*
 * Adds an entry for the method object 'theRelationship' to the xml row node 'rowsNode'
 */
function AddRow( xmlDOM, rowsNode, theRelationship )
{
      // Cast theMethod for intellisense
      var relationship as EA.Connector;
      relationship = theRelationship;

      // Create a Row node
      var row = xmlDOM.createElement( "Row" );
      
      // Get client details for the connector
      var client as EA.Element;
      var clientEnd as EA.ConnectorEnd;
      client = Repository.GetElementByID( relationship.ClientID );
      clientEnd = relationship.ClientEnd;
      
      // Get supplier details for the connector
      var supplier as EA.Element;
      var supplierEnd as EA.ConnectorEnd;
      supplier = Repository.GetElementByID( relationship.SupplierID );
      supplierEnd = relationship.SupplierEnd;
            
      // Add the Model Search row data to our DOM
      AddField( xmlDOM, row, "CLASSGUID", relationship.ConnectorGUID );
      AddField( xmlDOM, row, "CLASSTYPE", "connector" );
      AddField( xmlDOM, row, "Client", client.Name );
      AddField( xmlDOM, row, "Client", supplier.Name );
      AddField( xmlDOM, row, "Direction", relationship.Direction );
      AddField( xmlDOM, row, "Name", relationship.Name );
      AddField( xmlDOM, row, "Notes", relationship.Notes );
      AddField( xmlDOM, row, "Client Aggregation", clientEnd.Aggregation );
      AddField( xmlDOM, row, "Client Cardinality", clientEnd.Cardinality );
      AddField( xmlDOM, row, "Client Role", clientEnd.Role );
      AddField( xmlDOM, row, "Supplier Aggregation", supplierEnd.Aggregation );
      AddField( xmlDOM, row, "Supplier Cardinality", supplierEnd.Cardinality );
      AddField( xmlDOM, row, "Supplier Role", supplierEnd.Role );
      
      
      // Append the newly created row node to the rows node
      rowsNode.appendChild( row );
}

/*
 * Adds an Element to our DOM called Field which makes up the Row data for the Model Search window.
 * <Field name "" value ""/>
 */
function AddField( xmlDOM, row, name, value )
{
      var fieldNode = xmlDOM.createElement( "Field" );
      
      // Create first attribute for the name
      var nameAttribute = xmlDOM.createAttribute( "name" );
      nameAttribute.value = name;
      fieldNode.attributes.setNamedItem( nameAttribute );
      
      // Create second attribute for the value
      var valueAttribute = xmlDOM.createAttribute( "value" );
      valueAttribute.value = value;
      fieldNode.attributes.setNamedItem( valueAttribute );
      
      // Append the fieldNode
      row.appendChild( fieldNode );
}

ListDiagramConnectors();

29
Suggestions and Requests / Re: Search Based on Diagram Selected
« on: December 18, 2009, 01:43:23 pm »
PPS: Looks like the script is taking a while to get through the review process for the community site, so I'll post it here.

Please note that due to the 5k word limit I've had to split it over a few posts.

Part 1 of 2

Code: [Select]
/*
 * Script Name: ListDiagramConnectors
 *
 * Author: Michael Fraser (Sparx Systems)
 *
 * Purpose: Lists relationships between objects that appear on the diagram that is
 * currently selected in the project browser
 *
 * Date: 2009-12-17
 */

// ==========================================
//  GLOBAL DEFINITIONS
// ==========================================
var DIAGRAM_OT            = 8;

// The columns that will appear in the Model Search window
var SEARCH_SPECIFICATION = "<ReportViewData>" +
                                          "<Fields>" +
                                          "<Field name=\"CLASSGUID\" />" +
                                          "<Field name=\"CLASSTYPE\" />" +
                                          "<Field name=\"Client\" />" +
                                          "<Field name=\"Supplier\" />" +
                                          "<Field name=\"Direction\" />" +
                                          "<Field name=\"Name\" />" +
                                          "<Field name=\"Notes\" />" +
                                          "<Field name=\"Client Aggregation\" />" +
                                          "<Field name=\"Client Cardinality\" />" +
                                          "<Field name=\"Client Role\" />" +
                                          "<Field name=\"Supplier Aggregation\" />" +
                                          "<Field name=\"Supplier Cardinality\" />" +
                                          "<Field name=\"Supplier Role\" />" +
                                          "</Fields>" +
                                          "<Rows/>" +
                                          "</ReportViewData>";

/*
 * Main function
 */
function ListDiagramConnectors()
{
      Repository.EnsureOutputVisible( "Script" );
      
      Session.Output( "JScript: List Diagram Relationships" );
      Session.Output( "=========================================" );
      
      // Get the type of element selected in the Project Browser
      var treeSelectedType = Repository.GetTreeSelectedItemType();
      
      // Handling Code
      switch ( treeSelectedType )
      {
            case DIAGRAM_OT:
            {
                  // Code for when a diagram is selected
                  var theDiagram as EA.Diagram;
                  theDiagram = Repository.GetTreeSelectedObject();
                  
                  // Create a DOM object to represent the search tree
                  var xmlDOM = new ActiveXObject( "MSXML2.DOMDocument.4.0" );
                  xmlDOM.validateOnParse = false;
                  xmlDOM.async = false;
                  
                  Session.Output( "Working on diagram '" + theDiagram.Name + "' (Type=" +
                  theDiagram.Type + ", ID=" + theDiagram.DiagramID + ")" );
                  
                  // Load the search template
                  if( xmlDOM.loadXML(SEARCH_SPECIFICATION) )
                  {
                        // Resolve the results node in the xml template
                        var node = xmlDOM.selectSingleNode( "//ReportViewData//Rows" );
                        
                        // A connector has a one to many relationship with diagram (eg one connector
                        // may appear on many diagrams). The DiagramLink object represents an instance
                        // of a connector on a single diagram, and contains properties such as its
                        // geometry, visibility etc.
                        //
                        // Get all diagramLinks for this diagram
                        var diagramLinks as EA.Collection;
                        diagramLinks = theDiagram.DiagramLinks;
                        
                        for ( var i = 0 ; i < diagramLinks.Count ; i++ )
                        {
                              // Get the current diagram link
                              var currentLink as EA.DiagramLink;
                              currentLink = diagramLinks.GetAt( i );
                                                            
                              // Load the corresponding connector object for the link
                              var correspondingConnector as EA.Connector;
                              correspondingConnector = Repository.GetConnectorByID( currentLink.ConnectorID );
                              
                              // Add the connector's details to the search data
                              AddRow( xmlDOM, node, correspondingConnector );      
                        }
                        
                        // Fill the Model Search window with the results
                        Repository.RunModelSearch( "", "", "", xmlDOM.xml );
                        
                  }
                  else
                  {
                        Session.Prompt( "Failed to load search xml", 0 );
                  }
                  
                  break;
            }
            default:
            {
                  // Error message
                  Session.Prompt( "This script does not support items of this type.", 0 );
            }
      }
      
      Session.Output( "Done!" );
}

30
Suggestions and Requests / Re: Search Based on Diagram Selected
« on: December 17, 2009, 01:19:14 pm »
Hi wikitect, I've created an EA JScript (version 7.5+ is required) that lists all connectors on a diagram in the search window. Hopefully it should satisfy your requirements.

I'm just sorting out my access to the community site, so it should be available from there in an hour or two.

PS: In the future we plan on listing scripts flagged as "Project Browser" scripts in the Project Browser context menu, so that they can be accessed conveniently.

Pages: 1 [2] 3 4 ... 21