Message 1 of 7

Not applicable
06-12-2013
05:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to control the layer visibility on different sheets of the same drawing but have not quite figured it out yet.
We add a DXF sheet to drawings with flat pattern views to export to DXF for our laser. I wrote a VBA macro that adds the sheet, copies the flat pattern view and removes the dimensions to clean it up before creating the DXF. I am having a problem turning off the visibility of the bend lines on JUST the DXF sheet. I can turn bend lines and hidden lines off with this:
'Turn off bend lines and hidden lines For Each oView In oSheet.DrawingViews 'Set the layers collection Set oLayers = oDrawingDoc.StylesManager.Layers 'Turn off all bend lines and hidden lines For Each oLayer In oLayers If Not InStr(oLayer.Name, "Bend Centerline") = 0 Or Not InStr(oLayer.Name, "Hidden") = 0 Then oLayer.Visible = False Else End If Next Next
but it turns them off on all sheets. I want to only turn them off on the DXF sheet. How would this be done?
Solved! Go to Solution.