Recent posts

#1
jArchi / Re: Hide all relationship line...
Last post by Phil Beauvoir - Today at 08:43:15 AM
Quote from: Mate on May 16, 2024, 22:38:54 PMUnder properties.appearance there is a checkbox option called "Show Label" that does what I want, so was wondering if that can be done programmatically.

Yes, I forgot about that option, sorry. Ignore what I said earlier. See https://github.com/archimatetool/archi-scripting-plugin/wiki/Visual-Connections#labelvisible

connection.labelVisible = false;
#2
jArchi / Re: Hide all relationship line...
Last post by Mate - May 16, 2024, 22:38:54 PM
@Phil Beauvoir: Thank you, Sir! This gets me successfully moving along on my learning journey. Appreciate the detailed response and your patience.

"When you say you want to remove the connection labels, a connection label will show if you have given the relationship a name. So you'd have to set the relation's name to the empty string:" -->  you are correct, it's the name that displays as a label. I don't want to delete the name from the model, just it's visibility in the view.  Under properties.appearance there is a checkbox option called "Show Label" that does what I want, so was wondering if that can be done programmatically.

I'll check out the option (ie bogus label) you suggest it seems like a good workaround.
#3
General Archi Discussion / Re: List of organizations know...
Last post by AdGerrits - May 16, 2024, 12:53:04 PM
The VNG, an association that represents all Dutch municipalities, makes intensive use of Archi. In particular (but not only) for modeling the reference architecture for Dutch municipalities ('GEMMA'). The GEMMA is published via the website gemmaonline.nl. Views created with Archi are published there, among other things.
Archi repositories used within GEMMA are published at https://github.com/VNG-Realisatie/GEMMA-Archi-repository. They are used, among others, by municipalities and by software suppliers (who often, but not necessarily, also use Archi). Parts of the Archi models are also used within the software catalog (https://www.softwarecatalogue.nl) in which suppliers describe which software they supply and municipalities which software they use. The catalog makes visible, among other things, which software packages realize which application components and which standards they support.
#4
I don't look at the forum that often, but I thought this was a nice topic to model with some elements that I don't use that often. In a completely different way than the first model. That's why I created a small new model, which can be found at https://github.com/adgerrits/coArchi-model.
#5
jArchi / Re: Hide all relationship line...
Last post by Phil Beauvoir - May 16, 2024, 09:17:11 AM
Hi,

You can delete ArchiMate connections from a View without deleting the model relationships with something like the following:

selectedView = ... // Get the View you want to work with

// Find each ArchiMate relation in the View and delete the visual connection
$(selectedView).find('relation').each(connection => {
    connection.delete();
});

When you say you want to remove the connection labels, a connection label will show if you have given the relationship a name. So you'd have to set the relation's name to the empty string:

selectedView = ... // Get the View you want to work with

// Find each ArchiMate relation in the View and reset name
$(selectedView).find('relation').each(connection => {
    connection.name = "";
});

If you want to keep the relation's name but hide it you could assign a bogus label expression that resolves to an empty string:

selectedView = ... // Get the View you want to work with

// Find each ArchiMate relation in the View and assign label expression
$(selectedView).find('relation').each(connection => {
    connection.labelExpression = "${property:empty}";
});

Hope that helps, and thanks for your support on Patreon!

Phil
#6
jArchi / Hide all relationship lines or...
Last post by Mate - May 15, 2024, 18:01:17 PM
Hi jArchi wizards...

I am using jArchi 1.6.1 in Archi 5.3, I have been a Patron for a few years, but only now starting to do more complex modeling, size-wise, with Archi

Confess I am a noob in Javascript and jArchi, but eager to learn. Have searched the forum and couldn't find a noob-level answer :)

I have a view with about 50 elements in it and their respective relationship connections. The relationship lines and labels make the visual very busy and they do not add any meaningful value to my Stakeholder Viewpoint and conversation. So I like to remove them from the view. In some views just the labels, while in others both labels and lines.

I can iterate through all the relationships in each selected view but don't know how to hide the labels (or labels and lines), via a jArchi script, without deleting the relationship from the model. Like I can do from the UI.

Any guidance is much appreciated. Thanks in advance.
#7
jArchi / Re: Passing jArchi out to Node...
Last post by Phil Beauvoir - May 14, 2024, 09:59:17 AM
Hi, jArchi does have some support for CommonJS modules, see:

https://github.com/archimatetool/archi-scripting-plugin/wiki/Using-Node.js-modules

But maybe you're trying to do something more complex?
#8
jArchi / Passing jArchi out to Node usi...
Last post by 5-tom - May 13, 2024, 17:57:32 PM
I'm using a bit of a hack to get jArchi into an environment where I can use Node's builtins and ES modules, and was wondering if anyone has a better solution?

I'm piping the stdout of an .ajs script to a socket like so:

<run .ajs script here> | socat - /tmp/mysock.sock
My Node code:
import { Server } from "net";

const server = Server({});

server.on("connection", (client) => {
client.on("data", (data) => {
// use data here
}
});

server.listen("/tmp/mysock.sock");
#9
jArchi / Re: New idea: jArchi-utils: he...
Last post by 5-tom - May 10, 2024, 22:10:18 PM
Quote from: Phil Beauvoir on May 10, 2024, 18:08:11 PMHi Tom,

thanks for sharing. I wonder if your "isAllowedRelationship" is already taken care of in jArchi itself - https://github.com/archimatetool/archi-scripting-plugin/wiki/Model-Functions#isallowedrelationship - or are you trying to achieve this without a dependency on jArchi?

Phil

Yeah, the function in the package should behave exactly like the jArchi version - it's just that it doesn't depend on Archi, so it can be used in any runtime. It's like a re-implementation of jArchi but without the tether to the program itself.
#10
jArchi / Re: New idea: jArchi-utils: he...
Last post by Phil Beauvoir - May 10, 2024, 18:08:11 PM
Hi Tom,

thanks for sharing. I wonder if your "isAllowedRelationship" is already taken care of in jArchi itself - https://github.com/archimatetool/archi-scripting-plugin/wiki/Model-Functions#isallowedrelationship - or are you trying to achieve this without a dependency on jArchi?

Phil