Message 1 of 5
IDW DrawingView Visibility

Not applicable
09-15-2006
07:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to only show a view on my IDW when a Drill&Tap Hole is present and hide it at other times.
There are 2 named views on this particular drawing sheet:
"View1" , the base view
"TapEndView", the projected view of the shaft end of "View1"
Why does this code set not work? I assume that I'm setting the Object wrong for the Get/SetVisibility.
Dim oDrawingView As DrawingView
Select Case oUOM.GetValueFromExpression oTableParams.Item("Style").Value, kUnitlessUnits)
Case 1
'Debug.Print "Turn on IDW Sheet 1"
oSheet(1).Activate
If oUOM.ConvertUnits(oTableParams.Item("tapholediameter").Value, kDatabaseLengthUnits, kInchLengthUnits) > 0 Then
'Set Tap End View as Visible
For i = 1 To oSheet(1).DrawingViews.Count
If oSheet(1).DrawingViews(i).Name = "TapEndView" Then
Set oDrawingView = oSheet(1).DrawingViews(i)
Call oSheet(1).DrawingViews(i).GetVisibility(oDrawingView)
Call oSheet(1).DrawingViews(i).SetVisibility(oDrawingView, True)
End If
Next
Thanks,
Brian
There are 2 named views on this particular drawing sheet:
"View1" , the base view
"TapEndView", the projected view of the shaft end of "View1"
Why does this code set not work? I assume that I'm setting the Object wrong for the Get/SetVisibility.
Dim oDrawingView As DrawingView
Select Case oUOM.GetValueFromExpression oTableParams.Item("Style").Value, kUnitlessUnits)
Case 1
'Debug.Print "Turn on IDW Sheet 1"
oSheet(1).Activate
If oUOM.ConvertUnits(oTableParams.Item("tapholediameter").Value, kDatabaseLengthUnits, kInchLengthUnits) > 0 Then
'Set Tap End View as Visible
For i = 1 To oSheet(1).DrawingViews.Count
If oSheet(1).DrawingViews(i).Name = "TapEndView" Then
Set oDrawingView = oSheet(1).DrawingViews(i)
Call oSheet(1).DrawingViews(i).GetVisibility(oDrawingView)
Call oSheet(1).DrawingViews(i).SetVisibility(oDrawingView, True)
End If
Next
Thanks,
Brian