Archi Forum

Archi Plug-ins => jArchi => Topic started by: Hans.Downe on August 10, 2021, 16:09:35 PM

Title: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Hans.Downe on August 10, 2021, 16:09:35 PM
script fails when executing this line (Archi 4.8.1, jArchi 1.1.0 )

// Create a "CommunicationNetwork"
var NetworkZone1 = model.createElement("CommunicationNetwork", "NetworkZone-1");
console.log("Created new element: ", NetworkZone1.name);

The lines immediately previous were 2 CreateElement commands (a business role, and a business actor) and worked fine.
Thoughts?
ak
Title: Re: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Phil Beauvoir on August 10, 2021, 16:18:04 PM
Hi, you need "communication-network".
Title: Re: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Hans.Downe on August 10, 2021, 17:32:43 PM
Of course you are right.  I made the change and it worked.  But why is the literal different from what appears in the CSV export?
ak
Title: Re: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Phil Beauvoir on August 10, 2021, 17:35:34 PM
Quote from: Hans.Downe on August 10, 2021, 17:32:43 PM
Of course you are right.  I made the change and it worked.  But why is the literal different from what appears in the CSV export?
ak

All concepts use kebab case in jArchi to be in line with other selectors.
Title: Re: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Hans.Downe on August 10, 2021, 18:40:58 PM
Hey Phil, appreciate your help.  BTW I finally joined Patreon yesterday, which I'm really glad you set up.  I donated previous to Patreon.  Trying to guilt a few more people into doing the same.
Title: Re: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Phil Beauvoir on August 10, 2021, 18:43:32 PM
Quote from: Hans.Downe on August 10, 2021, 18:40:58 PM
Hey Phil, appreciate your help.  BTW I finally joined Patreon yesterday, which I'm really glad you set up.  I donated previous to Patreon.  Trying to guilt a few more people into doing the same.

Thanks, appreciate it!
Title: Re: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Hans.Downe on August 12, 2021, 23:31:25 PM
Hi again.  Related question: can you point me to a jArchi user guide / API reference?  I was trying to do a "create-element" for a "path", didn't work but I could not find a user guide.  help?
Title: Re: jArchi throws an error when trying to create a CommunicationNetwork
Post by: Phil Beauvoir on August 13, 2021, 07:38:15 AM
Quote from: Hans.Downe on August 12, 2021, 23:31:25 PM
Hi again.  Related question: can you point me to a jArchi user guide / API reference?  I was trying to do a "create-element" for a "path", didn't work but I could not find a user guide.  help?

Here's the wiki - https://github.com/archimatetool/archi-scripting-plugin/wiki

It's an open wiki so if you, or anyone, want to amend and contribute to it, please do.