iLogic, switching a layer on or off

iLogic, switching a layer on or off

cmharb
Advocate Advocate
2,336 Views
5 Replies
Message 1 of 6

iLogic, switching a layer on or off

cmharb
Advocate
Advocate

H all

 

I need to switch a layer in a drawing on or off using Ilogic. I know the layer name etc but can't find anything in the help.

 

Can anyone help please.

 

i have this much:

 

If iProperties.Value("Status", "Design State") = 3 Then
  ThisDrawing.Document.StylesManager.Layers("Banner")= False
Else
 ThisDrawing.Document.StylesManager.Layers("Banner")= True
End If

 

 

Thanks in advance

 

 

 

w7u-64sp1,iv14,intel.xeon.e5-2620 0 @2.00 2.00-32gb,gtx560-4gb
Accepted solutions (1)
2,337 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Accepted solution

ThisDrawing.Document.StylesManager.Layers("Banner").Visible= False

Message 3 of 6

cmharb
Advocate
Advocate
Perfect thanks.

I wish it had an auto suggest like VB has.
w7u-64sp1,iv14,intel.xeon.e5-2620 0 @2.00 2.00-32gb,gtx560-4gb
0 Likes
Message 4 of 6

Anonymous
Not applicable

Agreed!!!

0 Likes
Message 5 of 6

SebastianPappe
Community Visitor
Community Visitor

Hi,

 

how do I program the iLogic, that runs automatic by create a new drawing?

0 Likes
Message 6 of 6

Curtis_Waguespack
Consultant
Consultant

Hi @SebastianPappe ,

 

You can use an event trigger to do this:

 

Curtis_Waguespack_0-1687272981223.png

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes