style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Matt,
Here is some VB code that will create a drawing, then add views to that
drawing.
Private Sub cmdCreateDWGSheet_Click()
If oApp.ActiveDocument Is Nothing Then
MsgBox "The active
document must be a 'part' document"
Exit Sub
End If
If oApp.ActiveDocument.DocumentType <> kPartDocumentObject Then
MsgBox "The active
document must be a 'part' document"
Exit Sub
End If
Dim oPartDoc As PartDocument
Set oPartDoc =
oApp.ActiveDocument
Dim oDrawingDoc As DrawingDocument
Set
oDrawingDoc = oApp.Documents.Add(kDrawingDocumentObject,
oApp.FileManager.GetTemplateFile(kDrawingDocumentObject))
Dim VScale As Double
VScale = 0.11
Dim lHoriz As Long
lHoriz = 10
Dim lVert As Long
lVert = 15
Dim oDrawingViews As DrawingViews
Dim oDV As
DrawingView
Set oDrawingViews =
oDrawingDoc.Sheets(1).DrawingViews
Dim V_Org As Point2d
Set V_Org =
oApp.TransientGeometry.CreatePoint2d(lHoriz, lVert)
Set oDV = oDrawingViews.AddBaseView(oPartDoc,
V_Org, VScale, kLeftViewOrientation, _
kHiddenLineRemovedDrawingViewStyle)
Set V_Org = oApp.TransientGeometry.CreatePoint2d(lHoriz + 20, lVert)
Set oDV = oDrawingViews.AddBaseView(oPartDoc,
V_Org, VScale, kFrontViewOrientation, _
kHiddenLineRemovedDrawingViewStyle)
Set V_Org = oApp.TransientGeometry.CreatePoint2d(lHoriz, lVert + 18)
Call oDrawingViews.AddProjectedView(oDV, V_Org, kIsoTopLeftViewOrientation,
_
kHiddenLineRemovedDrawingViewStyle,
VScale)
End Sub