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

Pages: 1 ... 5 6 [7] 8 9 ... 34
91
There is an obscure bug where if you have a stereotype with a shapescript  and  override it with alternative image then later set it back to alternative image is none Sparx EA V12.1 does try and draw both the shapescript and the base UML shape simultaneously. Its been reported to Sparx and they've acknowledge it as a bug so some time in the future they'll fix it.
Other than that I've not experienced random switching as you described and I've used a lot of custom shape scripting.

92
General Board / Re: Looking for Pipe-Shape
« on: August 23, 2016, 07:37:49 am »
I've not seen a pipe supplied in Sparx EA before. Usually have to custom  create one. I have seen the cylindrical database shape in the whiteboard MDG toolbox.

Integration patterns MDG can be obtained from me. Here is a link to the EAI MDG on one drive share where you can get it.
https://1drv.ms/f/s!AnaX4GLdAnuOgsB7As2-0g0udyiNTQ

I won't leave it there forever so make sure you take a copy. To use just copy to a folder and point Sparx EA to it via the advance button on MDG dialog within Sparx EA

The other alternatives are
a) import the pipe image and use alternative image
b) create stereotype with shape script.


93
Bugs and Issues / Re: 1303: "lock" doesn't lock Text or Boundaries?
« on: August 05, 2016, 04:20:45 pm »
So where do you get 1303.  I've just downloaded the latest from the link and it says V 13.0.1302.52

94
Uml Process / Re: "Stakeholder" in ArchiMate
« on: August 04, 2016, 08:29:07 pm »
I can see why you might want to drop stakeholder as the examples like CIO, CFO given could simply be actors. Stakeholder could also be replaced by role. After all its just a specific type of role. However, I can't really see the value of creating yet another relationship called 'stakeholding'. May be you could elaborate with an example of how that would work better than just an association called 'stakeholder'?


95
Suggestions and Requests / Re: Archimate 3.0 Specification
« on: July 29, 2016, 05:32:24 pm »
Archimate 3.0 is included in the beta 2 of V13

96
General Board / Re: How to define table-like classes
« on: July 27, 2016, 04:57:39 pm »
Try view as list

97
General Board / Re: Custom profile diagram
« on: July 12, 2016, 04:47:59 pm »
Don't think you can with V9.2 other than writing a script or doing it manually.
In V12.1 you can set the legend to auto colour the elements depending upon various attributes including tagged values. Suggest using status where the value 'proposed' could be future state and 'implemented' is current state.
Thinks I saw something about an enhanced feature in V13 to deal with current and future state so maybe check that out too.
So it might be worth upgrading

98
General Board / Re: Benefits Maps and EA reporting capabilities
« on: July 09, 2016, 10:10:33 am »
You can get someone to create a custom MDG for Benefits maps
Not sure if this is what you are after but I did a investment logic map MDG a few years back used for a similar purpose it was based on the investment management from Victoria state. http://www.dtf.vic.gov.au/]http://www.dtf.vic.gov.au/]http://www.dtf.vic.gov.au/ But they've updated their website and the investment process since I did it.
Here is a url if you want to down load the files.
https://1drv.ms/f/s!AnaX4GLdAnuOgrQPpD4Tx_16JsSr5g
Will only make this available for 1 week after this post.

Just copy to a folder and reference the folder from Sparx EA MDG dialog. Accessed via menu Extensions>MDG Technologies.... From Dialog box click on advanced... button and add the reference to the folder where you store the two MDG files.
Or alternatively you could get the TOGAF MDG as it used to have the Business Motivations modelling in there but that comes for a price.

99
Wow, thank-you! I only had 65 or so requirements so I just redid them all as extendedRequirements, but that will help so much next time  (although I don't think I'm making that mistake again).

You are welcome. Suggest you keep that script handy you'll never know when you might need it. I've used it for things like changing UML activity diagrams to BPMN, ArchiMate 1.0 to 2.0. etc.

The export CSV, change stereotype and import CSV is a common technique used by folk with no programming skills so that works fine too.

100
Some JScript which can do the same thing. Just change entry in conversions[] array near the top
http://sparxsystems.com/forums/smf/index.php/topic,31109.msg225418.html#msg225418

101
Here is some jscript that could be used.

Code: [Select]
!INC Local Scripts.EAConstants-JScript

function TypeConversion(sourceObject,sourceStereotype,targetObject, targetStereotype)
{
    this.sourceObject = sourceObject;
    this.sourceStereotype = sourceStereotype;
    this.targetObject = targetObject;
    this.targetStereotype = targetStereotype;
}

var Conversions = new Array();
// sourceObject,sourceStereotype,targetObject, targetStereotype

//Add one or more Conversion mappings here
Conversions[0] = new TypeConversion("Requirement", "", "Requirement", "extendedRequirement");


// =================================================================================
// Converts elements type and stereotype as defined in the element conversation table.
// Navigates from selected package or element and recursively modifies each element from source to target
// NOTE: Requires a package to be selected in the Project Browser
//
// Related APIs
// =================================================================================
// Element API - http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/element2.html
// Repository API http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/repository3.html

/*
 * Project Browser Script main function
 */
function OnProjectBrowserScript()
{
// Get the type of element selected in the Project Browser
var treeSelectedType = Repository.GetTreeSelectedItemType();

// Handling Code: Uncomment any types you wish this script to support
// NOTE: You can toggle comments on multiple lines that are currently
// selected with [CTRL]+[SHIFT]+[C].
switch ( treeSelectedType )
{
case otElement :
{
// Code for when an element is selected
var theElement as EA.Element;
theElement = Repository.GetTreeSelectedObject();
ConvertElements( "", theElement );
break;
}
case otPackage :
{
// Code for when a package is selected
var thePackage as EA.Package;
thePackage = Repository.GetTreeSelectedObject();
NavigatePackage( "", thePackage );

break;
}
// case otDiagram :
// {
// // Code for when a diagram is selected
// var theDiagram as EA.Diagram;
// theDiagram = Repository.GetTreeSelectedObject();
//
// break;
// }
// case otAttribute :
// {
// // Code for when an attribute is selected
// var theAttribute as EA.Attribute;
// theAttribute = Repository.GetTreeSelectedObject();
//
// break;
// }
// case otMethod :
// {
// // Code for when a method is selected
// var theMethod as EA.Method;
// theMethod = Repository.GetTreeSelectedObject();
//
// break;
// }
default:
{
// Error message
        Session.Prompt( "This script requires a package to be selected in the Project Browser.\n" +
            "Please select a package or element in the Project Browser and try again.", promptOK );
}
}
}

//
// Outputs the packages name and elements, and then recursively processes any child
// packages
//
// Parameters:
// - indent A string representing the current level of indentation
// - thePackage The package object to be processed
//
function NavigatePackage( indent, thePackage )
{
    // Cast thePackage to EA.Package so we get intellisense
    var currentPackage as EA.Package;
    currentPackage = thePackage;
   
    // Add the current package's name to the list
    Session.Output( indent + currentPackage.Name + " (PackageID=" +
        currentPackage.PackageID + ")" );
   
    // Convert the elements this package contains
    ConvertElementsInPackage( indent + "    ", currentPackage );
   
    // Recursively process any child packages
    var childPackageEnumerator = new Enumerator( currentPackage.Packages );
    while ( !childPackageEnumerator.atEnd() )
    {
        var childPackage as EA.Package;
        childPackage = childPackageEnumerator.item();
        NavigatePackage( indent + "    ", childPackage );
       
        childPackageEnumerator.moveNext();
    }
}

//
// Converts the elements of the provided package to the Script output window
//
// Parameters:
// - indent A string representing the current level of indentation
// - thePackage The package object to be processed
//
function ConvertElementsInPackage( indent, thePackage )
{
    // Cast thePackage to EA.Package so we get intellisense
    var currentPackage as EA.Package;
    currentPackage = thePackage;
   
    // Iterate through all elements and add them to the list
    var elementEnumerator = new Enumerator( currentPackage.Elements );
    while ( !elementEnumerator.atEnd() )
    {
        var currentElement as EA.Element;
        currentElement = elementEnumerator.item();
        ConvertElements(indent+"    ",currentElement );

        elementEnumerator.moveNext();
    }
}

function ConvertElements( indent, theElement )
{
    // Cast theElement to EA.Element so we get intellisense
    var currentElement as EA.Element;
    currentElement = theElement;
    currentElement.ObjectType
    ConvertElement(indent+"    ",currentElement );
    // Iterate through all embedded elements and add them to the list
    var elementEnumerator = new Enumerator( currentElement.Elements );
    while ( !elementEnumerator.atEnd() )
    {
        var currentElement as EA.Element;
        currentElement = elementEnumerator.item();
        ConvertElements(indent+"    ",currentElement );
        elementEnumerator.moveNext();
    }
}

// Converts the element from source to target mappings from conversions array
//
// Parameters:
// - indent A string representing the current level of indentation
// - theElement The element object to be processed
function ConvertElement( indent, theElement )
{
// Debug Comment out when run for real
    //Session.Output( indent + "CALLED: ConvertElement with " + theElement.Name + " [" + theElement.Type + ", " + theElement.Stereotype + " )" );

    for ( var i = 0 ; i < Conversions.length ; i++ )
    {
        // If stereotype matches source list then convert
        if ( (theElement.Stereotype == Conversions[i].sourceStereotype) && (theElement.Type == Conversions[i].sourceObject ))
        {
            Session.Output( indent + "CONVERTED: " + theElement.Name + " (" + theElement.Type + ", " + theElement.Stereotype + ")" + "=>" +"("+Conversions[i].targetObject+","+Conversions[i].targetStereotype+")" );
            theElement.Type = Conversions[i].targetObject;
            //Over write the stereotype list to have only one stereotype
            theElement.StereotypeEx = Conversions[i].targetStereotype;
            theElement.Update();
            break; // once found cease iterating through for-loop.
        }
    }
}

OnProjectBrowserScript();


102
General Board / Re: Model drill down
« on: July 08, 2016, 01:12:51 pm »
You get a child diagram when you use Business Process in BPMN 2.0 toolbox. If you want to break down a Activity into further can achieve by right clicking on activity in diagram and from context menu new child diagram>add diagram. Then select another Business Process diagram to add.

103
Could try exporting to CSV file with the fields GUID, Name and stereotype.
Open in excel then search and replace <<requirement>> to <<extendedRequirement>> and save file.
Then import CSV back into Sparx EA model.

104
Automation Interface, Add-Ins and Tools / Re: MDG Migration
« on: June 22, 2016, 06:19:19 pm »
According to the API documentation, Diagram.MetaType is read-only. This might be the reason the original code wasn't working.
It does say .StyleEx is reserved for the use of Sparx Systems.

/U
Thanks Uffe.
I did try with MetaType originally then found it was read-only. Then tried StyleEx as that was read-write but that didn't seem to work when invoking Diagram.Update().

If at first you don't succeed go down another layer. That SQL worked a treat.

105
Automation Interface, Add-Ins and Tools / Re: MDG Migration
« on: June 22, 2016, 04:09:59 pm »
Thanks Geert, I was hoping I could avoid SQL but keep having to get down there aye? I managed to get this code pattern to work on SQL Server should anyone else have the same problem

Code: [Select]
UPDATE  t_diagram
SET StyleEx = REPLACE (CONVERT(NVARCHAR(MAX), StyleEx), 'MDGDgm=Old MDG Diagrams::Old Diagram;', 'MDGDgm=NewMDG Diagrams::NewDiagram')
WHERE StyleEx Like '%MDGDgm=Old MDG Diagrams::Old Diagram;%';

And boy was it fast compared to JScript.

Pages: 1 ... 5 6 [7] 8 9 ... 34