jh0401
Computer
- Apr 8, 2002
- 32
Does anyone have a good example for turning SolidWorks layers on and off with Visual Basic?
Thanks
Josh
Thanks
Josh
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Sub TurnOffLayer()
Dim swApp As Object
Dim Part As Object
Dim swLayerMgr As Object
Dim swLayer As Object
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.ActiveDoc
Set swLayerMgr = Part.GetLayerManager
Set swLayer = swLayerMgr.GetLayer("DIM")
swLayer.Visible = False
Set swLayer = Nothing
Set swLayerMgr = Nothing
Set Part = Nothing
Set swApp = Nothing
End Sub