Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I try to make a drawing directly from an assembly, but I have a problem to set the sheet size.
Is somebody there who can help me?
This is the rule I work on....
Dim oDoc As Document oDoc = ThisDoc.Document Dim templateFile As String templateFile = "C:\WF\CAD\Inventor 2016\Templates\CUN\CUN.idw" '''Place the path of your template idw Dim oDrawingDoc As DrawingDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject,templateFile,True) oDrawingDoc.Activate() Dim oSheet As Sheet = oDrawingDoc.Sheets.Item(1) Dim oSize As SheetFormat = sheetSize Dim oPoint1 As Point2d oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(40, 30) Dim oView As DrawingView oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint1, 1/2, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle) Dim oPoint2 As Point2d oPoint2 = ThisApplication.TransientGeometry.CreatePoint2d(15, 30) oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint2, 1/2, ViewOrientationTypeEnum.kRightViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle) Dim oPoint3 As Point2d oPoint3 = ThisApplication.TransientGeometry.CreatePoint2d(60, 30) oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint3, 1/2, ViewOrientationTypeEnum.kLeftViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle) Dim oPoint4 As Point2d oPoint4 = ThisApplication.TransientGeometry.CreatePoint2d(70, 15) oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint4, 1/2, ViewOrientationTypeEnum.kIsoTopRightViewOrientation, DrawingViewStyleEnum.kShadedDrawingViewStyle) oDoc.ReleaseReference End If
Thank You
Solved! Go to Solution.