Create Front, Top and ISO views and add dimension in drawing sheet for assembly's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear,
Please refer to the attached rack model image which I am generating based on the user input. Now I want to create views and add dimensions via ilogic. I have tried the below codes, but views are not creating properly, and am unable to add dimensions.
The attached drawing image is, I have manually created that. I need to create the same via ilogic.
At least overall length, height, and width, these three dimensions are enough in the views. Please help me with ilogic codes.
Thanks
Sub main Dim oAsmDoc As Document = ThisDoc.Document templateFile = "C:\Users\lap\Desktop\SJF\Multiple bays\Templates\SJF Rack Template.idw" Dim oDrawingDoc As DrawingDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject,templateFile,True) oDrawingDoc.Activate() Dim oSheet As Sheet = oDrawingDoc.Sheets.Item(1) Dim oCentralPoint As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width/2, oSheet.Height/2) Dim oView As DrawingView oView = oSheet.DrawingViews.AddBaseView(oAsmDoc, oCentralPoint, 1/100, ViewOrientationTypeEnum.kLeftViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle ) oView.RotateByAngle((PI / 180), True) Dim V2Point2D As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(oView.Center.X, oView.Center.Y - 10) Dim oView2 As DrawingView = oSheet.DrawingViews.AddProjectedView(oView, V2Point2D, DrawingViewStyleEnum.kFromBaseDrawingViewStyle) oView2.Position = ThisApplication.TransientGeometry.CreatePoint2d(oView.Center.X, oView.Center.Y - oView.Height / 2 - oSep - oView2.Height / 2) oDrawingDoc.SaveAs("C:\Users\lap\Desktop\SJF\Multiple bays\Workspace\SST\1\SJF.idw", True) End Sub