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 - Geert Bellekens

Pages: 1 ... 7 8 [9] 10 11 ... 512
121
Seems possible and makes sense.
Is there shape script for UML Component available then?
Or back to origin question: how can I replace icon (decoration) in UML Component with custom one by setting stereotype? I can add my custom icon, but default one remains being drawn beneath my one.

thank you
No shapescripts for UML elements are not available.
I think the only thing you can do is to use your own schapescript to mimic the original shape without the decoration.

Geert

122
I think you are comparing a UML component with your shapescript, not an Archimate component.

Geert

123
Hi q and Geert,
thanks for your answers, unfortunately removing the '4%' didn't work as well.
I would use the model document tags that I find in the Tags tab of its Properties windows .
So what I understand from the documentation is that if I put in the model document the following tags
RTFTemplate=MyTemplate, SearchName= MySQLSearch (that I defined in the Find In Project tab), SearchValue should contain the <Search Term> i can generate the document using as filter the query MySQLSearch.
Then in the template MyTemplate i proceed directly referring to the element or the package section, without referring to the custom section.
Is that possible in Enterprise Architect? What is the purpose of the RTFTemplate, SearchName and SearchValue tags in the model document ?

Thanks,
Francesco
Ah, you're talking about virtual documents using an SQL search as the source of the contents, I misunderstood.
I'm not sure what's wrong, but I do find it strange that you mix both #WC# and %

Geert

124
You can't use <Search Term> in an SQL Fragment.
You'll either have to use #OBJECTID# or #PACKAGEID# to limit your search results to the context.

Geert

125
Yes you can.
You can select an element using EA.Diagram.SelectedObjects.AddNew(elementID, type) or you can select a connector using EA.Diagram.SelectedConnector

If you have the GUID then you can get the EA.Element using Repository.GetElementByGUID() or the connector using Repository.GetConnectorByGUID()

Here the code I use in my framework:

Code: [Select]
public void selectItem(UML.Extended.UMLItem itemToSelect)
{
if (itemToSelect is Operation)
{
bool found = false;
//if the item is a relation or an operation then search through the links first
foreach (DiagramLinkWrapper diagramLinkWrapper in this.diagramLinkWrappers)
{
if (itemToSelect is Operation
   && diagramLinkWrapper.relation is Message)
{
Message message = (Message)diagramLinkWrapper.relation;
if (itemToSelect.Equals(message.calledOperation))
{
this.wrappedDiagram.SelectedConnector = message.wrappedConnector;
found = true;
//done, no need to loop further
break;
}
}
}
//The operation could also be called in an Action.
if (!found)
{
List<UML.Actions.BasicActions.CallOperationAction> actions = ((Operation)itemToSelect).getDependentCallOperationActions().ToList();
List<UML.Diagrams.DiagramElement> diagramObjects = this.diagramObjectWrappers.ToList();

foreach (Action  action in actions)
{
//try to find an diagramObjectwrapper that refrences the action
UML.Diagrams.DiagramElement diagramObject = diagramObjects.Find(
x => x.element.Equals(action));
if (diagramObject != null)
{
//found it, select the action and break out of for loop
this.selectItem(action);
found = true;
break;
}
}
}
if (!found)
{
//can't find a message on this diagram that calls the operation.
//then we try it with the operations parent
this.selectItem(((Operation)itemToSelect).owner);

}
}
else if (itemToSelect is ConnectorWrapper)
{
this.wrappedDiagram.SelectedConnector = ((ConnectorWrapper)itemToSelect).wrappedConnector;
//check if it worked
if (wrappedDiagram.SelectedConnector == null
   && itemToSelect is Message)
{
this.selectItem(((Message)itemToSelect).calledOperation);
}
}
else if (itemToSelect is ElementWrapper)
{
ElementWrapper elementToSelect = (ElementWrapper)itemToSelect;
this.wrappedDiagram.SelectedObjects.AddNew(elementToSelect.wrappedElement.ElementID.ToString(),
   elementToSelect.wrappedElement.Type);
}
}

126
Automation Interface, Add-Ins and Tools / Re: RefGUID tagged value
« on: September 09, 2017, 04:13:54 pm »
With the EA Navigator add-in you can navigate both ways over a RefGUID tagged value.
Actually, in recent versions of EA the traceability window offers the same thing.

Almost. The traceability window only allows to go from elements to other elements.
With the EA Navigator you can also navigate from and to relations, attributes and operations using the tagged values.

Geert

128
Check out this page of the manuel:
http://sparxsystems.com/enterprise_architect_user_guide/13.5/model_publishing/custom_sql_fragments.html

Somewhere at the bottom of no 5 you'll find:
Quote
It is possible to force a field to be processed as a hyperlink or as formatted notes, by providing a column in this format:
    custom >
     {Name}
     <fieldname>.Formatted      (or <fieldname>.Hyperlink)       (for all repositories, excluding .eap)
     < custom
In your custom SQL Query statement, you must use an alias matching the template field name; for example (in MySQL):
     SELECT ea_guid AS CLASSGUID, Object_Type AS CLASSTYPE, Name, Note as "Note.Formatted" FROM t_object
     Where Object_ID=#OBJECTID#

Geert

129
Automation Interface, Add-Ins and Tools / Re: Diagram picker
« on: September 06, 2017, 08:47:57 pm »
Hi Geert,

I notice that your EA Navigator add in that you created displays diagrams.

How did you manage to get that to work?

Thanks,
Rupert

Simple. I check the selected item in the project browser, and if that is a diagram then i display it in my treeview.
But I guess you are looking for a different answer?

Geert

130
If you search for "CreateObject" + "jscript" you should find an old thread that lists the variations of this command in the different scripting languages.

Geert

131
- run "ea.exe /register".
I've never done that.
All I ever did was install EA normally, and then I could access the running instance of EA from Excel or Word, or any other VBA environment.

It is a fact however that you cannot mix Admin and regular processes. Either you run everything with your normal user, or you run everything with the admin user.

If it still doesn't work I would suggest to contact sparx support. Maybe they have an idea why it isn't working on your side.

Geert

132
Automation Interface, Add-Ins and Tools / Re: RefGUID tagged value
« on: September 06, 2017, 08:34:57 pm »
With the EA Navigator add-in you can navigate both ways over a RefGUID tagged value.
So you would need only one (tree -> forest) and then you can go to forest and see that it is referenced by tree.

It might not be exactly what you were looking for, but it is definitely better then creating two tagged values to describe a single thing (with the risk of having one of the tagged values go out of sync with the other)

Geert

133
Bugs and Issues / Re: SysML prevents using UML use cases
« on: August 10, 2017, 10:28:15 pm »
You can pin toolboxes to be always visible.
Right click on an empty space on your toolbox to see the option.

Geert

134
General Board / Re: Diagram swimlane orientation
« on: August 10, 2017, 02:53:02 pm »
Rupert,

You are changing it on diagram level, but you can also change it at diagramObject level.

Here's the code I use to change the Activitypartitions from Horizontal to vertical (or vice versa)

Code: [Select]
public void setOrientation(bool vertical)
{
string currentStyle = this.wrappedDiagramObject.Style.ToString();
string vPartitionValue;
vPartitionValue = vertical ? "1":"0";
this.wrappedDiagramObject.SetStyleEx("VPartition",vPartitionValue);
string styleAfter = this.wrappedDiagramObject.Style.ToString();
}

Geert

135
You didn't copy the class EAConnector from the Excel VBA environment.
Press F11 in the Excel and inspect all class modules there.

Geert

Pages: 1 ... 7 8 [9] 10 11 ... 512