System tag write blocking

I have a container with 4 objects in it and I want to control visibility on the container based on if the mouse is over the container or not. I created a custom property called HighlightVis for the coordinate container.
I created two event scripts, one based on onMouseOver and the other based on onMouseOut. I then assigned a script for each one with MouseOver writing a true value to HighlightVis and MouseOut writing a false value to HighlightVis. It does not seem to be working.

Here is what I have for the onMouseOut script:
system.tag.writeBlocking(self.custom.HighlightVis, “false”)
Here is the onMouseOver script:
system.tag.writeBlocking(self.custom.HighlightVis, “true”)

What am I missing?

Couple things.

  1. writeBlocking expects array/list arguments
  2. you should not use blocking calls like this from a UI thread because it will freeze the UI while it executes.

Thanks. So how would I go about getting this done?

Ah, is this Perspective or Vision?

writeBlocking is for writing to tags… the first argument would be a list of tag paths.

It seems like you just need to do this in your scripts:

self.custom.HighlightVis = 0

perspective. will try that simple line as see if it works.

Hi, @Kevin.Herron,
how do we block write with custom property values like how we do it on tags?

There’s no need, the assignment is blocking and should should take effect immediately.

Is there something you are seeing that makes you think otherwise?

Ok,
oh I was thinking like let say I have (bool)
value1, value2, value3, value4 in my custom properties
and when I press a button,
I want to write true to value1, value2, value3, value4
but if something happens let say error when writing on value2 than don’t write to all of them…?