Book a Demo

Author Topic: Set RefGUID tagged value to <none> in add-in  (Read 3235 times)

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Set RefGUID tagged value to <none> in add-in
« on: July 17, 2015, 07:59:03 pm »
Hi all,

I have a stereotyped profile element having a RefGUID tagged value by design. The shapescript of the element shows the referenced element name if the tag has a value.
At some point in time I am clearing all instances of that tagged value in the model by
Code: [Select]
UPDATE t_objectproperties SET [Value]=' ' WHERE Property='MyTVName'Note that the value of [Value] is not allowed to have a zero length, so I had to include a space. If this is done like that shapescript interprets that as definition.
When I select <none> in the tagged values window manually (press ellipsis to the type selection dialog -> select none) the shapescript interprets it correctly.

Q: How does EA store the <none> selection in the value of field of the tag? Is there something like null in SQL? I'd like to immitate the EA behavior.

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Re: Set RefGUID tagged value to <none> in add-in
« Reply #1 on: July 17, 2015, 08:18:43 pm »
OK guys,

I answered my question on my own. The correct query to accomplish what I need is
Code: [Select]
UPDATE t_objectproperties SET [Value]=NULL WHERE Property='MyTVName'