Archi Forum

Archi Plug-ins => jArchi => Topic started by: bigyin on September 19, 2021, 21:58:01 PM

Title: Adding annotations by script
Post by: bigyin on September 19, 2021, 21:58:01 PM
Trying to generate a script which runs on a selected object (or set of) and generates note, then assigns a connection between the note and the selected object, then the label expression $connection:target{documentation} to the note.

This supports adding documentation in a 'teaching mode' which can be removed by script when no longer required.

Maybe just too late (past my bedtime), but I can not figure out the JArchi Api to assign the connection between the created note as source and selected elements as target).

I think this was added in 1.1.1
Title: Re: Adding annotations by script
Post by: Phil Beauvoir on September 20, 2021, 08:24:41 AM
Hi Matt,

is this what you need?

https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Object#createconnection

Regards,

Phil
Title: Re: Adding annotations by script
Post by: bigyin on September 20, 2021, 09:21:55 AM
Phil As always, spot on ..  :) :)
Title: Re: Adding annotations by script
Post by: bigyin on September 20, 2021, 09:53:16 AM
I have tried my script in 4.8.1 and 4.9 Beta, but when I try in an earlier file I created on an EA version I gate an error, see attached.

Its not important for my test model, but maybe indicates underlying issue etc
Title: Re: Adding annotations by script
Post by: Phil Beauvoir on September 20, 2021, 09:56:55 AM
That means you're trying to connect between two objects that are not in the same View.