Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
bretrick30
in reply to: Anonymous

 

You can use an If statement to control the layer.  

 

For example, if you have a parameter in your drawing called "Material", the code will look like this.

 

SyntaxEditor Code Snippet

If Material = "Stainless Steel" Then
    ThisDrawing.Document.StylesManager.Layers("Layer Name").Visible = True
Else
    ThisDrawing.Document.StylesManager.Layers("Layer Name").Visible = False
End If