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

Pages: [1] 2 3 ... 10
1
General Board / Ordering Kanban Boards
« on: May 15, 2025, 10:31:39 pm »
I am familiar with using SQL queries to add content to Kanban boards, but does anyone know if there's a way to control the order elements are added to a swimlane? I have tried using a WHERE clause to order things, but EA doesn't seem to take any notice?

2
That is all I needed to hear! If you've given up then I won't even entertain the idea!

Thanks

3
I am decided to finally learn scripting  :)

I am finding the native script editor limited in functionality and wondered if I can somehow integrate with an IDE like MS Visual Studio.

Is this possible? Have people done it? What are the advantages/disadvantages? Does anyone have an idiot's guide to getting it working?

4
Automation Interface, Add-Ins and Tools / Re: View Specification Defaults
« on: September 21, 2024, 12:55:10 am »
Interesting - I love View Specifications as they provide a way to highlight when you have created content that does not conform to the underlying meta-model. They also don't require you to manually construct toolbox elements which is another task I find very tedious!

5
Automation Interface, Add-Ins and Tools / View Specification Defaults
« on: September 21, 2024, 12:25:28 am »
Hi

Not the first person to ask this question (previous posts have gone unanswered)...

Can diagram display options be specified in view specification. For example, hiding connectors by default or supressing connector stereotypes?

Thanks!

6
The answer is the t_objectfiles table!

Code: [Select]
SELECT
    t_object.name,
    t_objectfiles.*
FROM
    t_object INNER JOIN
    t_objectfiles ON t_object.object_id = t_objectfiles.object_id
WHERE
    t_object.name = 'My Use Case with URL';

7
Hi

It's possible to store URLs to external resources within EA using the Files tab on the element properties window.

Does anyone know which table/field this data is encoded in?

I want to export it via a template?

Thanks!

8
Hi everyone,

Happy New Year

I am aware that it is possible to add boilerplate text to newly created elements in EA by specifying a Project Template package, and then adding text to the notes field.

https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/using_element_templates.html

Does anyone know if/how you can add the boilerplate text to an element definition within an MDG profile?

Motivation: boilerplate text is only added to the element if it is added to a diagram. Elements added direct to the brower (or via the specification manager) to not have the template text added!

Thanks all!

9
Quote
Now in this case, have you checked Element.propertyType? That might contain the elementID of the classifying block.

Geert, you total legend! Thank you that worked a treat!  ;D

However, I will be mindful of your advice regarding the speed advantages of SQL. I am partly doing this because I need to learn scripting sometime and this felt like the right time to try!

10
Thanks for the rapid reply Geert! I must confess, you are probably right regarding the nesting depth! Is querying the database from a script fairly fast? If so, I am tempted to call a search from the script and then do further processing on the results in the script itself.

11
I have a model that contains a structural hierarchy of blocks, linked together with composition relationships. With each compositional relationship created, EA creates a part property that is nested under the element at the target (diamond) end of the connector. The nested part property is typed by the block at the source end of the composition and the behaviour is as expected and conforms with SysML 1.5.  ;D


(Block hierarchy)
https://ibb.co/F79MPwc


(Browser structure)
https://ibb.co/ggfp7Pp

I need to produce a document template that can, starting at the "parent" block level, iterate down through each of the block/part pairs until it reaches the bottom of the tree. This is so I can generate a bill of materials (BOM). Moreover, I need to present not only the name of each of the component parts, but also the tagged values that it owns (which are relevant to the BOM, such as manufacturer/serial numbers etc).

The complexity of the document means that it cannot be achieved with a simple document template so I need to either construct a custom SQL fragment template or script.

Because the structure of the system can be arbitrarily deep, I have concluded (perhaps incorrectly) that I cannot achieve mu goals with SQL (I would have to set an arbitrary number of joins in my SQL query). I'm new to scripting in EA and but have decided I need to learn this skill.

The problem I have encounted is as follows:

The EA object model captures the relationship between the part property and its classifying block in the t_object.pdata1 field. When I examine the content of this field in the database I can see that - for the part property element - this field holds the GUID of the classifying element. This same information should be accessible via the Element.MiscData attribute, but when I try and return its value it is empty?

The EA help documents the usage of the MiscData as follows
https://sparxsystems.com/enterprise_architect_user_guide/15.1/automation/element2.html#:~:text=MiscData,and%20so%20on


My idea (ultimately) is to build a function that can be recursively applied, starting at a target (parent) block and running until it hits a classifer block that has no part properites; at which point it would stop.

Right now, I'm still in the development stages and am just using loads of Session.Output statements to try and work out what is going on. I thought this part of the problem would be the easy bit!

Here's the (JavaScript) code that I have so far. Can anyone offer a suggestion what's wrong?
Code: [Select]
function findPartProperties(objectID)
{
//Variable declarations
var currentElement as EA.Element // The element currently being processed
var childElement as EA.Element // A child element of the currently processed element
var classifierElement as EA.Element // The element that classifies a part (and may in turn have further parts)

//Set current element
currentElement = Repository.GetElementByID(objectID);

//Access child elements by looping through all nested elements
for (let i = 0; i < currentElement.Elements.Count; i++) {
childElement = currentElement.Elements.GetAt(i);
Session.Output("Found nested element: " + childElement.Name + " of type: " + childElement.Type + " and with classifier: " + childElement.MiscData(1));
}
}

The session output I get is as follows (with "System Design1" block set to the current tree item):
Code: [Select]
Found nested element: ci1apart of type: Part and with classifier:
Found nested element: ci1part of type: Part and with classifier:

12
Uml Process / Cross references in embedded RTF documents
« on: October 30, 2018, 08:03:18 pm »
We are all familiar with being able to create a caption within an MS Word document (e.g. Figure 1) and then cross referring to that caption from somewhere else within the document.

Does anyone know how this can be achieved within an RTF document written within EA?

Thanks!

13
Hi everyone

I want to prevent any structural features that I add to a block/class from being automatically added to any existing diagrams by default...

For example, on let's say I have a BDD called "My System Diagram"and onto this I place two blocks: "My System" which connects (via reference association) to "Another System". Neither of these blocks own any structural features such as ports or part properties at the time the diagram was created.

Now, assume I create a new diagram (perhaps in a later development phase) and I add a new block, called "My Subsystem" and then create a compositional relationship from this new block back to the "My System" block. This causes EA to create a Part Property on "My Block" (this is good!). I then do some more work and I add a port to both "My System" and "Another System".

Now, I return to the BDD diagram that I created earlier and I see that EA has added these structural features to the blocks inside their respective compartments. This causes the elements on the diagram to resize and messes up the look of the diagram (this is bad!).

Does anyone know how to stop EA from doing this by default?

The only way I have found is to create a diagram in a "Template" package, on which EA bases all future diagrams. I can use this template to turn off all of the various structural display elements - but the problem is that I have hundreds of diagrams that were created before the template diagram was created. This means that my old diagrams are not affected by the template!

Please say I don't have do go back and manually change them all!!

Note: "locking" the diagram does not help - that only stops people from dragging elements around and/or manually resizing them

14
Automation Interface, Add-Ins and Tools / Discussions and Reviews
« on: November 30, 2017, 11:25:33 pm »
Hello

EA recently introduced a new "Reviews and Discussions" feature which we are trialling at the moment.

http://www.sparxsystems.com/enterprise_architect_user_guide/13.5/guidebooks/tools_ba_element_discussions.html

Does anyone know where in the database these discussions get stored? I want to extract them out to a Word document

Thanks!

15
Excellent - Hidden Text Works fine for me. Thanks everyone!

Pages: [1] 2 3 ... 10