Author Topic: How to access the the content of canvas-model-block and canvas-model-sticky?  (Read 313 times)

erik.hag1@gmail.com

  • Newbie
  • *
  • Posts: 2
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1619
  • Code Punk
    • Archi
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! https://www.archimatetool.com/donate

erik.hag1@gmail.com

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