Line Tool Visible Property

Hi, I have a simple question...
I used the Line Tool to draw a zig zag line and I want the zig zag line to be not visible...
How do I access the visible property without having to go into the script editor first.

I want the zig zag line to be made visible when you hover over another component and then go back to being invisible.

Please help.
Capture

From experience, I wouldn't trust a mouse entered or mouse exited event handler to control visibility in a layered Vision project, but you could probably use mouse moved for something like this. Just use the component's mouseMoved event handler to set the line to visible, and then use invokeLater to check and see if the mouse has left the component. If so, set the visibility back to false.

Example:
image

path = event.source.parent.getComponent('Path') #path to the line
def timeout():
	path.visible = True if event.source.mousePosition else False
path.visible = True
system.util.invokeLater(timeout, 500)
1 Like

Btw, you are only Showing the Basic properties
Screenshot_20230513_133857_Chrome
This shouldn't even be an option imo, but unfortunately it's the default option and trips up every newcomer

2 Likes

Thanks! I was using a mouse move as the event handler. I ended up using the height and width to make the component disappear and then when someone hovered their mouse I would change the height and width back to it's original position.

Can I just call path? If the name of my path is path1, can i just call path1 and access the visible property like you did? path.visible = true?

1 Like

ohhh, ok, I appreciate the help guys!!

Yes

Yes, that default setting is very confusing for newcomers and in very old versions of Ignition it doesn't remember your changes. It always defaults to B when you open the designer. Something to remember if you stumble across a ~v7.5 Ignition installations in the field.