Recent posts

#1
jArchi / Re: inRels and OutRels in jArc...
Last post by Mate - July 03, 2025, 18:35:34 PM
 :) Now I know better! Thanks, Phil—I truly appreciate your help.
#2
jArchi / Re: inRels and OutRels in jArc...
Last post by Phil Beauvoir - July 03, 2025, 17:29:29 PM
Hi,

your variable "e" is a single object. As inRels() and outRels() is a function of a collection you need to wrap it in $(e):

$('element').each(function(e) {
    // Get all outgoing relationships for this element using outRels()
    var outCount = $(e).outRels().length;
    console.log('Element: ' + e.name + ' | Outgoing relationships: ' + outCount);
});

See https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Collection
#3
jArchi / inRels and OutRels in jArchi 1...
Last post by Mate - July 03, 2025, 14:38:33 PM
I am running into a curious issue where in/outRels give an error while loop works!

$('element').each(function(e) {
    var outCount = 0;
    $('relationship').each(function(rel) {
        if (rel.source && rel.source.id === e.id) {
            outCount++;
        }
    });
    log('Element: ' + e.name + ' | Outgoing relationships: ' + outCount);
});
   
   
This code snippet works!



$('element').each(function(e) {
    // Get all outgoing relationships for this element using outRels()
    var outCount = e.outRels().length;
    log('Element: ' + e.name + ' | Outgoing relationships: ' + outCount);
});

while this one using outRels gives an error

   org.graalvm.polyglot.PolyglotException: TypeError: invokeMember (outRels) on com.archimatetool.script.dom.model.ArchimateElementProxy failed due to: Unknown identifier: outRels
   at <js>.:anonymous(relTest.ajs:15)
   at com.oracle.truffle.polyglot.PolyglotFunctionProxyHandler.invoke(PolyglotFunctionProxyHandler.java:151)
   at jdk.proxy1/jdk.proxy1.$Proxy39.accept(Unknown Source)
   at java.base/java.util.ArrayList.forEach(Unknown Source)
   at com.archimatetool.script.dom.model.EObjectProxyCollection.each(EObjectProxyCollection.java:363)

I am a novice programmer with limited jArchi experience. Likely I am doing something incorrect and will appreciate someone point that out and helping me learn.

Thanks,
#4
jArchi / Re: AI - jArchi - Archi - Gemi...
Last post by Phil Beauvoir - July 02, 2025, 20:21:47 PM
Thanks for sharing! I posted it on BlueSky - https://bsky.app/profile/architoolkit.bsky.social/post/3lsywnueegc23

Phil
#5
jArchi / AI - jArchi - Archi - Gemini A...
Last post by smileham - July 02, 2025, 14:01:16 PM
Just wanted to highlight that I've put a few scripts together to integrate Archi and the Gemini API to support LLM document generation based on an ArchiMate model here:

https://smileham.co.uk/2025/07/02/ai-support-for-archi-models-using-gemini-and-jarchi/
#7
General Archi Discussion / Re: Application-Component appe...
Last post by Phil Beauvoir - June 25, 2025, 10:26:42 AM
There was a change in Archi 5.0.0 that changed how the figure types are stored in the .archimate file. When importing from a a pre 5.0.0 Archi file a conversion is done. But if you are using different versions of Archi at the same time this might affect things. Ensure all users are on the same version of Archi and that the model in question is opened in Archi to check the figures, and then set them as necessary.
#8
General Archi Discussion / Application-Component appearan...
Last post by CD - June 25, 2025, 10:11:55 AM
Hi everyone,

We're running an Archi CLI on a Linux server that publishes our Archi models as a web application. The server pulls the source models from a Git repository, which we use for collaborative modeling with the coArchi plugin.

Since upgrading from Archi 4.9.3 to 5.3, we've encountered an issue with the appearance of our application components in the web app: they now appear in Form 2 (see the right-hand model in the attached image), whereas in all our views, we model them using Form 1 (see the left-hand model).

This change seems to have been introduced with the upgrade, but I haven't been able to find where this can be configured. Does anyone know how to enforce the appearance of components in the web export? Could this be set via the Archi CLI, a configuration file, through a script executed on the server or perhaps within Archi?

Thanks in advance for your help.

Have a nice day.

Regards,
CD
#9
General Archi Discussion / Re: AchiMate and Claude's MCP ...
Last post by Phil Beauvoir - June 24, 2025, 14:38:20 PM
Hi, yes this is an interesting direction. No wonder that @Jean-Baptiste Sarrodie has the word "Visionary" in his forum profile.  ;)
#10
coArchi / Re: Issue with reappearing del...
Last post by CD - June 24, 2025, 09:09:14 AM
Hi Jean-Baptiste, Hi Phil,

Thank you, that's exactly the conclusion I had reached as well.

Thanks for your help.

Have a nice day,

Regards,
DC