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.


Topics - MatthiasVDE

Pages: [1] 2 3 ... 5
1
I use this function to open a file, but now I want to adapt it to select a file or folder to save to. For that I need to change the script but I'm not familiar with those activeX stuf.

Code: [Select]
function selectFilePath()
dim wShell, oExec, sFileSelected
set wShell=CreateObject("WScript.Shell")
set oExec=wShell.Exec("mshta.exe ""about:[b]<input type=file id=FILE><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>[/b]""")
sFileSelected = oExec.StdOut.ReadLine
selectFilePath = sFileSelected
end function

2
I'm writing an add-in to read and write the attribute descriptions. When I read the description (notes) from a specific attribute, EA always selects that attribute in the project browser.
For some functional reasons I don't want this, is there any way to avoid this?


Code: [Select]
txtAttributeDescription.Text = attribute.Notes

3
I added a table to my RTF template and everything works fine. But I want according to the templates that we use in MS Word a table with two different alternating row colors.
Is it possible to achieve this in Sparx?

4
I have a package with multiple diagrams. But I want to generate model documents only for one specific diagram in that package. I trigger the project browser script from one specific diagram, but the model document is always based on the parent package of the diagrams. So when I'm generating my documents, it always contains all the diagrams from that package.

Do I really need to put one diagram per package, or is there any workaround for this?

5
I'm extending the Repository class with some extra functions to make my development easier.

Code: [Select]
public class Repository : EA.RepositoryClass
{

}

When I add some new functions it works perfect. But now I want to add a new 'Collection' type to create and add new objects to the repository.

Code: [Select]
// Existing function
Repository.Stereotypes.AddNew

// New function
Repository.CustomObjects.AddNew

It's a long time ago that I worked with C#, so I hope that someone can give me a hint into the right direction.

6
I'm struggling a while with an annoying problem. On computer A, we have an EAP file with some scripts, searches and RTF templates in orde to generate Wordt documents from business processes. It works fine.
But, when we open that same EAP file, on computer B, Sparx EA generates a blank Word document...

However:
- Same .NET version is installed (dotNetFx35setup)
- Same Windows version

7
General Board / Headings and document generation
« on: September 27, 2020, 09:34:25 pm »
With 'Levels', EA means the level of 'nesting' correct or not?
Thus in this case below:
Package = Level 1 (the parent of all)
Element = Level 2 (child of package)
Diagram = Level 3 (child diagram of element)

Code: [Select]
package >
element >
{Element.Name}
Description
{Element.Notes}

diagram >
Diagram
{Diagram.DiagramImg}
< diagram
< element
< package

I defined some heading styles to use in my templates for document generation (heading 1, heading 2, ...)

My goal is to print the Element.Name in heading 1, and the Element.Notes (description) and die diagram image (Diagram) in heading 2. 
I applied the correct heading styles to the titles and fields in my template. But after generating, the diagram title is always in heading 3. In one way or another this sounds 'logic', because I'm lowering a level... But when I define this heading explicit as heading 2, I expect that EA uses heading 2 and not heading 3...

When I use heading 1 for the diagram, the generation is correct and the title for Diagram is displayed in heading 2. Geert told me that this is normal behaviour in EA, but is there really no other way to solve this cleanly without defining a higher heading?

I experimented a bit with 'Lists and Overrides' but it seems this is only do deal with the numbering levels, but you can't manipulate the heading levels, right?


8
Automation Interface, Add-Ins and Tools / List Overrides
« on: September 26, 2020, 04:12:33 am »
Can someone explain in clear words what the exact purpose is of List Overrides, and how they work?
I'm struggling for months with this functionality, and I still don't know what it exactly does...

Extra question: How can you change the color of your header numbering in the stylesheet? I can select some colors in the edit level options, but only a few, not the complete RGB pallet.

9
Automation Interface, Add-Ins and Tools / DocumentGenerator - InsertText
« on: September 25, 2020, 04:09:01 am »
I'm working on the generation of a document with templates and a stylesheet.
But when I try to insert a custom title:
Code: [Select]
docGenerator.InsertText "Mainprocess", "heading 1"
The style "heading 1" is never applied to the text, however that style is defined in the stylesheet and the template.

10
Automation Interface, Add-Ins and Tools / Text is displayed poorly
« on: September 24, 2020, 06:57:57 pm »
I'm parsing a CSV with items in order to create elements with the same properties as described in that CSV file.

The tekst in de CSV file is:

Quote
Storage & Backup​ - Extra Backups, retention policies, etc…​

In the element I see:

Quote
Storage & Backup​ - Extra Backups, retention policies, etc…​

How can this be avoided?


11
I'm testing with a script that create diagrams based on a CSV input. After each test I delete all the diagrams and elements that are created.
But when I look in the windows explorer to the size of my eapx file, it becomes bigger and bigger... I looks like the data is nog effectively removed after deleting all the diagrams and elements in my project browser.

I'm using EA 15

12
Automation Interface, Add-Ins and Tools / Add a diagram hyperlink to diagram
« on: September 05, 2020, 04:24:25 pm »
Hi,


I have a landingpage,where I want to put hyperlinks to other diagrams.

Example: https://i.imgur.com/airVpHU.png

Code: [Select]
'add diagram hyperlink
dim diagramHyperlink as EA.Element
set diagramHyperlink = diagramPackage.Elements.AddNew("","Text")
'diagramHyperlink.Notes = "Some text"
diagramHyperlink.Alias = "Name of source diagram"
diagramHyperlink.Stereotype = "NavigationCell"
diagramHyperlink.Update()

dim doHyperlink as EA.DiagramObject
set doHyperlink = diagram.DiagramObjects.AddNew("l=200;r=300;t=-20;b=-40", "")
doHyperlink.ElementID = diagramHyperlink.ElementID
doHyperlink.Update()

diagram.Update()
diagram.DiagramObjects.Refresh()
Repository.ReloadDiagram(diagram.DiagramID)

I am unable to set the properties in such a way that I get a hyperlink like in my example. Am I looking wrong?

13
i'm trying to set a background color on an element object, in order to give this element the same color on each diagram it appears.

Quote
      activity.SetAppearance 1,0,RGB(35, 169, 242)
      activity.Update()

But because this doesn't work, ik was wondering I shouldn't use a diagramObject instead of an element?

14
Automation Interface, Add-Ins and Tools / Edit StereoTypeEx in database
« on: August 31, 2020, 11:49:27 pm »
In what table can you modify the StereoTypeEx for an object?

15
I created a BPMN2.0::StartEvent through a script and add it to a pool. In my project browser the StartEvent is created within the pool, but when I try to drag it to my diagram, I got the following error message:

Quote
When dropping embedded elements (Ports, Object Nodes, etc.) on to a diagram, you must drop them on their correct owner. For embedded elements fixed to a parent edge, drop them near the desired edge

The activities that I created in the same way, are perfectly possible to drop onto the diagram in and outside the pool.

The StartEvent is only dropable on the edge of the pool, and then appears a blue startEvent right on the border/edge of the pool element. Very strange...

Pages: [1] 2 3 ... 5