Book a Demo

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 - Barrie Treloar

Pages: [1] 2 3
1
I have an element with an alternative image.
The image size is 64x64.
The name of the element is longer than 64.

When using the option "Appearance > Show Name Under Image" I'd like the textbox allocated to the name to fit the name.

Is there a way to do this?

I've tried stretching the element to be wide enough the image is also stretched.

2
If I may, the request here is actually a way to drag elements between packages more easily. Multiple instances of the project browser is a "first thought" of how to achieve this.

[deleted].

We already have several.

The Package Browser window is my preferred way. It allows elements to be dragged both to and from the Project Browser to change the package.
The Specification Manager is a similar but different option.
Another option that I don't use often is the Model Views window.

These may need to be more visible, perhaps training would help, or maybe there's some reason why they don't work for you.

Apologies for necro posting, but this is the most relevant google result.

And I haven't found any detailed instructions on setting this up.

So for future me, here they are:

See the docs at https://sparxsystems.com/enterprise_architect_user_guide/17.1/the_application_desktop/reportview.html

I used the Browser to locate my root package.
Right click on root package > Open Package in > List View
(Dock the Package Browser with the Browser and Inspector)
Right click on the Fields in the Package Browser > Field Chooser >
- Removed all fields but Name
- Added Field Type

In the top right toolbar of the Package Browser clicked on the format icon
- enable Show Nested Package Control
- enable Show Element Hierarchy
- enable Show Filter Bar
- disable Group bar

Now I can scroll through all the AWS elements to locate the one I want.

Or type in the Name field to filter the list

Drag and Drop onto diagrams is now easy!

3
General Board / Re: New Roadmap Diagram - How to add elements?
« on: August 01, 2025, 03:04:57 pm »
Necro an old post.

But I just had the exact same problems as the original poster, 10 years later.

The documentation is not clear on how to create a roadmap diagram.
It was only through blind luck clicking on the see also links in the legend column that I noticed the auto-apply options and with some fiddling of filter setting can auto-apply the legend colours to the elements that I choose to drop onto the roadmap.

Then the next problem is alignment, the diagram grid points do not align to the tick points.
Going into preferences and fiddling the grid size is an exercise in futility, as there is no way to establish the left edge to start from.
Even if that was possible its a nightmare to eyebal the tick spaces...

4
Was for logging.

But can do that via Repository, and I've sent a pull request with the transmogrification of EA-Matic scripts for Session.ouput -> Repository equivalent.

5
Thanks for looking.

I've got my workaround working.

EA's J-stuff is the same as EA's VB-stuff, which EA automatically adds the global Session into scope for you.

But what I need the Session for is EA's addin-stuff, because I need to inject it into the VBScript engine that is running inside EA addins and not in EA directly.

6
Geert's EA-Matic is running as an Addin. So everything that is VBScript within EA-Matic is loaded into the EA-Matic Addin's process space to run.

When EA runs a script, it looks like it adds Session as a global object.

But I can find nothing in the Enterprise Architect Object Model Reference for Session, and thus can find no way to add Session as a global object for EA-Matic.

As a workaround I'm transmogrifying Session.Output to Repository.WriteOuput, once I pass through RegEx hell to cope with VBScript line concatentation and optional parenthesis usage for one arg subroutines...

7
I'm working with Geert's EA-Matic and when those scripts are run in an Addin environment the Session object is not in the global scope.

See https://sparxsystems.com/enterprise_architect_user_guide/16.0/add-ins___scripting/session_object.html

But I can't find anything in the Enterprise Architect Object Model
Reference (https://sparxsystems.com/enterprise_architect_user_guide/16.0/add-ins___scripting/reference.html) that will return me a Session object so I can place it into the Addin scope.

Does anyone know how I retrieve Session from another Object Model reference?

8
General Board / Re: Addings an element to multiple Diagram Layers?
« on: March 23, 2023, 04:36:04 pm »
Of course there's no way to set a property on multiple selected elements...

Use the filter condition "Contains" (not One of)

This script requires editing before running, as I've not yet learnt how to prompt for user input...

Writing this script was still faster than manually selecting each element and setting keywords...

Code: [Select]
option explicit

'[path=\Element]
'[group=Element]

dim KEYWORD_TO_APPEND
' CHANGE THIS VALUE BEFORE RUNNING
KEYWORD_TO_APPEND = "business_architecture_view"

sub main
dim diagram as EA.Diagram
dim diagramObject as EA.DiagramObject
dim element as EA.Element

Session.Output "Start..."

'get the current diagram
set diagram = Repository.GetCurrentDiagram()
if not diagram is nothing then
'first save the diagram
Repository.SaveDiagram diagram.DiagramID
for each diagramObject in diagram.SelectedObjects
set element = Repository.GetElementByID(diagramObject.ElementID)
Session.Output "Working on '" & element.name & "'"
if InStr(element.Tag, KEYWORD_TO_APPEND) = 0 then
If element.Tag = "" then
element.Tag = KEYWORD_TO_APPEND
else
element.Tag = element.Tag & "," & KEYWORD_TO_APPEND
end if

if not element.Update() then
Session.Output "Update failed: " & element.GetLastError()
end if
end if
next
end if
logger.INFO "Done"
end sub

main

9
General Board / Re: Addings an element to multiple Diagram Layers?
« on: March 23, 2023, 03:21:43 pm »
Thanks Paolo.

I *did* search before posting, and so I have no idea how I missed those threads.

It was easier to look through your posts to find it!

https://sparxsystems.com/forums/smf/index.php/topic,47573.msg277302.html#msg277302

As usual, another feature of Sparx not yet implemented.

I'll fiddle with Filters and One Of..

10
General Board / Re: Addings an element to multiple Diagram Layers?
« on: March 21, 2023, 07:53:34 pm »
Aren't filters global?
I didn't really want to pollute my model with them just for one diagram.

11
General Board / Addings an element to multiple Diagram Layers?
« on: March 20, 2023, 04:03:19 pm »
If I have an element that should belong to multiple Diagram Layers, how do I do that?
It looks like the Filter & Layers tool only allows a 1:1 relationship.

12
General Board / Re: Using ChatGPT to create EA Scripts
« on: March 20, 2023, 04:01:08 pm »
The problem is that documentation is difficult to come by.
EA makes some odd choices as you traverse down its internal object model, and is missing some functions/methods that would seem obvious.

Coming from someone who doesn't know VBScript but can code in other languages there are quite a few gotchas that really blocked me from making any progress.

Purely for my own benefit for when I come back to scripting in EA in a few years time, I've added to Geert's VBScript-Library with Documentation:
https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/tree/master/Documentation

His repository of scripts give me the major benefit that I can use the EA Automation Reference https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/automation/reference.html to find what I want to use and grep for example of its use.

13
General Board / Re: Setting default hyperlink details type?
« on: April 13, 2017, 07:30:26 am »

14
General Board / Setting default hyperlink details type?
« on: April 12, 2017, 10:31:23 am »
In the notes toolbar, then hyperlink button opens the Hyperlink Details with the default type of "File".

Is there any way to change this?

My most common hyperlink is to a web address.

This would save me a few microseconds over the years...

15
Thanks for the replies.

qwerty,

setting
DiagramLink.LineStyle = 7
works fine.
This must do the black magic behind the scenes as the resultant .Style is
DiagramLink.Style = Mode=3;EOID=7502739F;SOID=859B351F;Color=-1;LWidth=0;TREE=LH;   

Geert,
Have you got some thoughts one how to get those IDs?
The diagram is never very large, nor are the number of connectors on an element very large, so the speed penalty of a scan is not great.
Rather it's just a tedious indirect process.

I have the selected object, but I can't get at its DiagramLinks easily to make the adjustments.

qwerty,
With the SQL I can get the row I want, then I need to use the black magic to mangle the style back in, and then Repository.Execute to put it back.
I'll need to think about that some more.
The indirect scan is solving my problem well enough now without introducing this complexity.

Pages: [1] 2 3