Can you distinguish Cropped views from sketch views?

Can you distinguish Cropped views from sketch views?

mslosar
Advisor Advisor
474 Views
3 Replies
Message 1 of 4

Can you distinguish Cropped views from sketch views?

mslosar
Advisor
Advisor

As it says, can you tell the difference between a cropped view and a sketched view? I've got a bit that loops through all drawing views searching for sketched views and removes them. This creates a problem with Cropped views being sketches. I'd like to be able to tell the difference between the two so I can remove one and not the other.

 

This is the snippet i've got:

 

 Dim oDV As DrawingView
                Dim oSV As DrawingSketch
                If SkVBox.CheckState = Windows.Forms.CheckState.Checked Then
                    For Each oDV In oSht.DrawingViews
                        For Each oSV In oDV.Sketches

                            oSV.Delete()
                        Next
                    Next
                End If

 Thanks

0 Likes
Accepted solutions (1)
475 Views
3 Replies
Replies (3)
Message 2 of 4

mslosar
Advisor
Advisor

Turns out they are separate things.

 

Turns out the problem we've run into is we have people who make a breakout view, then put a crop on top of it.

 

A breakout view uses a sketched view, so when the program runs it sees the sketched view for the breakout and deletes it - then the crop view, which 'was' based on the breakout view apparently does not know what to do any long and displays the whole view once again.

 

So, now the question is there a way to tell if a sketch is used by a breakout view....

0 Likes
Message 3 of 4

mslosar
Advisor
Advisor
Accepted solution
Turns out to be much easier for breakout views.....

If oDV.breakoutoperations.count < 1 then
for each osv in osht.drawingviews
osv.delete()
next
end if

0 Likes
Message 4 of 4

kmiller
Collaborator
Collaborator

Did anyone ever find a way to do this via API without using the breakout view?  only other post I found said cropped views aren't supported in the API however that post was from 2010. 

 

Any thoughts would be appreciated as we are currently trying to come up with some code to do this.

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
0 Likes