Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a rule that does two things:
1. removes invisible lines from all views except the first one (“WIDOK1”)
2. Adds center lines on all views (after removing point 1)
The rule works, but you have to enable it twice because it only removes invisible lines in "one pass".
This is my code:
Dim oDrawingDoc As DrawingDocument = ThisApplication.ActiveDocument
Dim Arkusz As Sheet = ThisDrawing.Document.ActiveSheet
Dim ViewCount As Integer = oDrawingDoc.ActiveSheet.DrawingViews.Count
Dim StartCount As Integer = 0
Dim oview As DrawingView
If Arkusz.DrawingViews.Count <> 0 Then
For StartCount = 1 To ViewCount
oview = Arkusz.DrawingViews.item(StartCount)
aView = oview.Name
If aView = "WIDOK1" Then
ActiveSheet.View(aView).View.ViewStyle = 32257
Else If aView = "WIDOK ISO" Then
ActiveSheet.View(aView).View.ViewStyle = 32259
Else
ActiveSheet.View(aView).View.ViewStyle = 32258
ActiveSheet.View(aView).View.SetAutomatedCenterlineSettings()
End If
Next
End If
InventorVb.DocumentUpdate
I think it's a matter of some correct updating after completing point 1. But I've already tried splitting the loop, running the creation of centerlines as an additional external rule - it doesn't work.
Can anyone help me??
Regards,
ralfmja
Solved! Go to Solution.