Adding or removing tagged values in your model - using the model debugger
No edit summary
No edit summary
Line 14: Line 14:
   )
   )
  )
  )
[[Category:MDriven Designer]]

Revision as of 14:26, 28 May 2018

This page was created by Lars.olofsson@mdriven.net on 2017-03-06. Last edited by Edgar on 2025-01-20.

For background, see Using the model debugger to change the model itself

To find all viewmodels with a specific tag

Span.allInstances->select(s | s.TaggedValue->select(tv | tv.Tag.toUpper='MVC')->notEmpty)

To add the tag MVC to all viewmodels that don't already have it

Span.allInstances->select(s | s.TaggedValue->select(tv | tv.Tag.toUpper='MVC')->isEmpty)->collect(s |
let newtag = TaggedValue.Create in
(
    newtag.Tag := 'MVC';
    newtag.Value := 'True';
    newtag.ModelElement := s
  )
)
MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments