Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can you distinguish Cropped views from sketch views?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
mslosar
341 Views, 3 Replies

Can you distinguish Cropped views from sketch views?

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

3 REPLIES 3
Message 2 of 4
mslosar
in reply to: mslosar

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....

Message 3 of 4
mslosar
in reply to: mslosar

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

Message 4 of 4
kmiller
in reply to: mslosar

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".

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report