Jump to content
Sign in to follow this  
Ármányos Kő

Layers(1).Visible=FALSE works, but Layers(1).Visible=TRUE does not OK.

Recommended Posts

Ármányos Kő

I am trying to switch layer visibilities into TRUE mode in Illustrator.

Switching to FALSE is ok, and can be seen after each MSGBOX.

CODE
Autoitsetoption("WinTitleMatchMode", 2)

Winactivate("Illustrator","")

$oIll = ObjGet("","Illustrator.Application")

$layers = $oIll.Documents(1).Layers.Count

For $i = 1 to $layers

$layervisi = $oIll.Documents(1).Layers($i).Visible

MsgBox(0,$layers,$oIll.Documents(1).Layers($i).Name&@CRLF&$layervisi)

Select

Case $layervisi = FALSE

$oIll.Documents(1).Layers($i).Visible = TRUE

Case $layervisi = TRUE

$oIll.Documents(1).Layers($i).Visible = FALSE ;This line just does not function.

EndSelect

Next

$oIll.Documents(1).Layers(1).Visible = TRUE ;Tried this simple line, does nothing at all...

Outside the script it is possible to click and switch the layers into TRUE (switch on). The file has no lock, password, or whatever. I am logged in as admin.

What can be wrong??? :P

I have no idea, other then bug in Illy. :D

Thanks

Edited by Ármányos Kő

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×