06-23-2022
03:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-23-2022
03:24 PM
I agree that comments can be very useful. But if you ask me the code should make itself clear. Consider snippet 1 and add comments. Something like this.
' Let the user select the view that he/she wants to update. Dim view As DrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a drawing view") ' Check if the user selected a view. If not stop the rule. If (view Is Nothing) Then Return ' Create a list of all bend cures and add bend notes to all sheets. view.DrawingCurves.Cast(Of DrawingCurve).Where(Function(c) c.EdgeType = DrawingEdgeTypeEnum.kBendDownEdge Or c.EdgeType = DrawingEdgeTypeEnum.kBendUpEdge).ToList().ForEach(Function(c) view.Parent.DrawingNotes.BendNotes.Add(c))
Even with comments, it's hard to read.
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com