Message 1 of 3
Unsuppress Drawingviews using LINQ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I want to (un)suppres drawingviews using LINQ.
When i debug the code in VS the functions seems to work fine but the drawingviews remain (un)suppressed.
Can someone help me out?
First i filter for drawingviews which contains TREK , then i want to (un)suppress them.
Sub main Dim invapp As Inventor.Application = ThisApplication Dim oDrawDoc As DrawingDocument = invapp.ActiveDocument Dim oSheet As Sheet = oDrawDoc.ActiveSheet oSheet.DrawingViews.Cast(Of DrawingView).ToList().Where(Function(oDrawView As DrawingView) oDrawView.Name.Contains("TREK")).tolist.ForEach(Function(oDrawView As DrawingView) oDrawView.Suppressed = True) End Sub
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
please feel free to "kudos"