Enterprise Architect version 15.0

download
purchase

enzh-CNcsnlfrdehiiditkoplptruskessv

My Profile

Social Media Channels

facebook  twitter  youtube   linkedin

Monday, 28 April 2014 20:50

Sparx Enterprise Architect project browser script: find the classifier of an object, port, part or attribute

Written by
Rate this item
(1 Vote)

Early this month, I published a script to sort elements from a selected package by the alias name. This article provides another project browser script that finds and selects the classifier for an instance or a class attribute, or the property type for a SysML port or part.

Sparx Enterprise Architect makes it possible to find from a diagram an instance classifier with a right click > Find > Locate Classifier in Project Browser, or a SysML port/part's classifier with a right click > Find > Locate Property Type in Project Browser. 

 

As there isn't any similar feature from the project browser, I wrote a script to achieve it, whilst extending it to a class attribute.

Enterprise Architect Project Browser scripts

Enterprise Architect lets you create project browser scripts. Once created in your project, these are available via a right click on a selected package from the browser, as illustrated below:

sparx enterprise architect project browser find-classifier-for-instance-port-part-attribute

 

Find the classifier of an instance, port, part, or attribute with FindClassifier project browser script

To add the FindClassifier Project Browser script to your modelling project:

Step 1: open the scripting view using the Enterprise Architect menu Tools > Scripting.

Step 2: click on "New Project Browser Group" to store all user-defined scripts, e.g. Project Browser scripts.

Step 3: click on "New script > New VBScript" to define the "Find Classifier" script, e.g. FindClassifier.

sparx enterprise architect project browser script findclassifier

Step 4: open the script and copy/paste the content from the following file: download FindClassifier VBScript text file

Step 5: save the script (Ctrl-S).

Step 6: test the FindClassifier script with a right click on a selected object from the Project Browser to find its classifier, and select Scripts > FindClassifier

Result: the instance's class has been selected from the Project Browser as illustrated below.

sparx-enterprise-architect-project_browser_script_sortbyalias_running result

Here is another example of using this script with a class attribute:

sparx-enterprise-architect-project_browser_script_sortbyalias_running result

 

Read 11497 times Last modified on Tuesday, 29 April 2014 03:36
Guillaume

Guillaume Finance

VISEO (Sparx EA Expert, OMG OCSMP Model User certified)
 
Modelling consultant and expert on Sparx Systems Enterprise Architect modelling tool and solution, I'm helping clients with the model-based approach using standards for a number of contexts including:
- Software analysis, design and architecture with UML.
- Systems Engineering and MBSE with SysML.
- Enterprise Architecture, IT landscape with UML or ArchiMate.
- Business processes with BPMN.
My other activities include:
- Defining and maintaining the model repository including requirements, analysis and design for software projects.
- Remote support and expertise on Sparx Enterprise Architect modelling.
- Running training sessions on UML or SysML with Sparx Systems Enterprise Architect.
- Installation and configuration of Prolaborate web solution for Sparx EA.
 
I publish articles and news about modelling languages and Enterprise Architect on my blog www.umlchannel.com, maintain eaUtils free addin: www.eautils.com, and I participate in the European EA User Group events www.eausergroup.com
Contact details: guillaume[at]umlchannel.com

www.umlchannel.com
Login to post comments