PVMT "null" string diagram styler

Hi,

I just started to use the PVMT add-on and would like to highlight all elements which do not have a value yet for a specific property of type string. If I simply add a String Style with Comparator to “=” and leave the Value field empty, it doesn’t work. Neither if I use ““. Ideally it would capture both null strings as well as empty strings.

Thanks,
Sebastiaan

Interesting.

I don’t have all the details but I am not sure that the “PVMT highlighting capabilities” were designed for highlighting “null/empty string” values but rather highlighting things depending on actual values. Maybe there is a way to make it work, but given your feedback, I doubt it.

Probably the easiest way to do it is to write a Python4Capella script to detect that.

Another other option could be to contract with Obeo so that they develop what’s needed to make it work as you want in PVMT.

Stephane

1 Like

Hi Stephane,

Thanks for the answer. I wouldn’t mind to set default values (e.g., undefined). However, if I set such default value in my Configuration PV and I create a new (in scope) object, it doesn’t get this default value. Instead the property remains empty (both for string type as well as enumeration). Am I missing something?

Moreover, it would be nice if it’s possible to “push” the default value to any existing item which doesn’t have a value yet for that property. Based on some examples I found, I managed to use P4C to set the values anyway, but it feels a bit cumbersome.

Regards,
Sebastiaan

I agree with you… Thanks