Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic, switching a layer on or off

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
cmharb
1939 Views, 5 Replies

iLogic, switching a layer on or off

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
Tags (2)
5 REPLIES 5
Message 2 of 6
waynefisher
in reply to: cmharb

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

Message 3 of 6
cmharb
in reply to: waynefisher

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
Message 4 of 6
waynefisher
in reply to: cmharb

Agreed!!!

Message 5 of 6
SebastianPappe
in reply to: cmharb

Hi,

 

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

Message 6 of 6

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report