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

Pages: [1] 2 3 ... 14
1
Seems like you are taking the complicated path. ???

This is the function I use in my FileSystemFolder utility class: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Utils/FileSystemFolder.vbs

Code: [Select]
public function getUserSelectedFolder(startPath)
dim folder, shell
Set shell  = CreateObject( "Shell.Application" )
if len(startPath) > 0 then
Set folder = shell.BrowseForFolder( 0, "Select Folder", 0,startPath)
else
Set folder = shell.BrowseForFolder( 0, "Select Folder", 0)
end if
if not folder is nothing then
set getUserSelectedFolder = New FileSystemFolder
getUserSelectedFolder.FullPath = folder.Self.Path
Session.Output "folder.Self.Path: " & folder.Self.Path
else
set getUserSelectedFolder = Nothing
end if
end function

Geert

Hi Geert,

I used that one, but the UI is different and not easy to navigate.

2
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

3
In the background there was a TechtChanged event that updates the value, so there was actually an update.
I fixed it by disabling the UIUpdates, thanks!

4
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

5
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?

6
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?

7
Hi Geert,

My 'Repository' class inherits from the EA.Repository class in the Interop DLL.
And I want to extend my class with some extra functions to add for example easily new Tagged Value Types.

EDIT: Indeed, I forgot... If I remember your concept of wrappers was based on a new class that contains the class from the EA.dll?

8
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.

9
Thanks Max, I'll try it.

10
It works with an MDG, thx Geert!

11
Hi Geert,

I'll try to import the searches again to see what happens then.

12
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

13
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?


14
Automation Interface, Add-Ins and Tools / Re: List Overrides
« on: September 26, 2020, 08:58:55 pm »
Additional question 2: Do you need to define those lists on stylesheet level, or do they only work directly on the template?

15
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.

Pages: [1] 2 3 ... 14