How to access the the content of canvas-model-block and canvas-model-sticky?

Started by erik.hag1@gmail.com, February 23, 2021, 15:08:20 PM

Previous topic - Next topic

erik.hag1@gmail.com

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

Phil Beauvoir

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
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

erik.hag1@gmail.com

Of course, I understand. Looking forward to it - but as mentioned would actually prefer to see these features integrated into the archimate diagrams:)