iLogic Sheet size

iLogic Sheet size

Cosmin_V
Advocate Advocate
1,255 Views
3 Replies
Message 1 of 4

iLogic Sheet size

Cosmin_V
Advocate
Advocate

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

0 Likes
Accepted solutions (1)
1,256 Views
3 Replies
Replies (3)
Message 2 of 4

SašoPrijatelj
Advocate
Advocate
Accepted solution

Hi.

 

This should work:

Dim oSheet As Sheet = oDrawingDoc.Sheets.Item(1)
oSheet.Size = DrawingSheetSizeEnum.kA0DrawingSheetSize

Replace kA0DrawingSheetSize with the size you actually want.

 

Best regards,

Sašo

-----------------------------------------------------------------------
AutoDXF - automatic flat pattern creation and batch export to DXF for Inventor

Please use "Accept as Solution" & give "Kudos" if this response helped you.
Message 3 of 4

Cosmin_V
Advocate
Advocate

Thank You  saso

 

Is Ok, is open the sheet which I wont but now the border is stil from A1...

0 Likes
Message 4 of 4

SašoPrijatelj
Advocate
Advocate

Hi,

 

After changing the sheet size you also have to change the border. There are 2 ways: using iLogic function SetBorder or using VB approach. Both are described in Vladimir's post here:

https://forums.autodesk.com/t5/inventor-customization/ilogic-change-drawing-borders-from-assembly/td...

-----------------------------------------------------------------------
AutoDXF - automatic flat pattern creation and batch export to DXF for Inventor

Please use "Accept as Solution" & give "Kudos" if this response helped you.
0 Likes