Archi Forum

Discussion Boards => jArchi => Topic started by: erik.hag1@gmail.com on February 23, 2021, 15:08:20 PM

Title: How to access the the content of canvas-model-block and canvas-model-sticky?
Post by: erik.hag1@gmail.com on February 23, 2021, 15:08:20 PM
Hi,

I'm working on a few scripts to generate documentation from Archi models. Just recently looking into Canvas features, I fail to find the usual name and documentation main properties in the UI for canvas-model-block and canvas-model-sticky (though the name can be set and read via scripting), so looking for a way to read the somewhat strange "content" and "notes" properties. Are there undocumented features that I could use for now? Or else I guess a feature request is called for... (while waiting for similar image support for specialization of the archimate symbols).

Here's a snippet of my test code:

/***
   else if (o.type == "canvas-model") { //
      console.log(o.type + "\t" + o.name + "\t" + o.id);
      var viewItems = $(o).find();
      
      viewItems.each(function(item) {   
         if ($(item).is("canvas-model-image") )
            console.log(item.type + "\t" + item.name + "\t" + item.documentation + "\t" + item.id); // works for documentation (and for name after been set via scripting)
         else if ($(item).is("canvas-model-block") )
            console.log(item.type + "\t" + item.name + "\t" + item.documentation + "\t" + item.id);  //name can be set and read via scripting, not documentation; how to read "content"
         else if ($(item).is("canvas-model-sticky") )
            console.log(item.type + "\t" + item.name + "\t" + item.documentation + "\t" + item.id); //name can be set and read via scripting, not documentation; how to read "content"
         else if ($(item).is("canvas-model-connection") )
            console.log(item.type + "\t" + item.name + "\t" + item.id); // works
      });
***/

Regards Erik
Title: Re: How to access the the content of canvas-model-block and canvas-model-sticky?
Post by: Phil Beauvoir on February 23, 2021, 15:40:32 PM
Hi Erik,

Canvas objects have not been fully implemented in jArchi yet. This includes content, notes, image, position, hints, creation. It's on the (massive) to do list.

Phil
Title: Re: How to access the the content of canvas-model-block and canvas-model-sticky?
Post by: erik.hag1@gmail.com on February 23, 2021, 16:03:00 PM
Of course, I understand. Looking forward to it - but as mentioned would actually prefer to see these features integrated into the archimate diagrams:)