First View on sheet?

First View on sheet?

coreyparks
Advisor Advisor
386 Views
1 Reply
Message 1 of 2

First View on sheet?

coreyparks
Advisor
Advisor

      Has anyone looked into wether or not there would be some way to change the "first" view inserted on a sheet to another view?  We do our drawings in small assemblies with all of the indiviual details on following sheets.  We need to insert the assembly on each sheet first to make sure the title block shows the proper information.  Too many times the designer forgets and misses it entirely or we have to go back and create a new sheet insert the view properly then copy and paste the details from the other sheet onto this one.  A bit of a pain especially if there are other nores and such as those cannot be copied at the same time as the views.  It woul be nice if there was a way I could tell Inventor I want a selected view to be the first view inserted thereby changing which view drives the title block info.  Is this possible?

Please mark this response "Accept as solution" if it answers your question.
-------------------------------------------------------------------------------------
Corey Parks
0 Likes
387 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

This is not pretty:

Public Sub MakeFirstViewLast()
    Dim oApp As Application
    Set oApp = ThisApplication
    ' Kontrollerar att det är en ritningsfil.
    If oApp.ActiveDocumentType <> kDrawingDocumentObject Then
        MsgBox "Active document must be a drawing!"
        Exit Sub
    End If
    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = oApp.ActiveDocument
    Dim oSheet As Sheet
    Set oSheet = oDrawDoc.Sheets(1)
    Dim oDrawingViews As DrawingViews
    Set oDrawingViews = oSheet.DrawingViews
    Dim oDrawingView As DrawingView
    Set oDrawingView = oDrawingViews(1)
    Call oDrawingViews.AddBaseView(oDrawingView.ReferencedDocumentDescriptor.ReferencedDocument, _
        oDrawingView.Position, _
        oDrawingView.Scale, _
        oDrawingView.Camera.ViewOrientationType, _
        oDrawingView.ViewStyle, _
        oDrawingView.Name, _
        oDrawingView.Camera)
    Call oDrawingView.Delete
End Sub

 It places the first view last. It is not hard to imagine problems with this approach, projected views etc. It seems to work for the case with two base views, I just coded it for fun, no hence no testing.

0 Likes