iLogic Drawing Automation

iLogic Drawing Automation

Cosmin_V
Advocate Advocate
328 Views
2 Replies
Message 1 of 3

iLogic Drawing Automation

Cosmin_V
Advocate
Advocate

Hi

I have a iLogic Assembly and I do a "User Parameter" (Do_ Drawing ="No", "Yes" ).

I would like if is possible when I chose "Yes" to open the assembly in the Drawing template.

Is that Possible?

0 Likes
329 Views
2 Replies
Replies (2)
Message 2 of 3

Cosmin_V
Advocate
Advocate

I have found some thinks to do it bu is stil not complete, I can't control the scale completely yet, just the first number.

And I still need to control the: sheet format, borders, title block, and sketch symbol.

Can someone help me whit this?

 

I have see in some tutorials then is possible when the drawing is create, the sheet is all ready have a form on...How they do that?

Many Thanks!....

0 Likes
Message 3 of 3

Cosmin_V
Advocate
Advocate

Sorry I post before I add my rule

If Drawing="Yes" Then

Dim  oDoc As Document   
oDoc = ThisDoc.Document

'Create a drawing from the drawing template
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 oPoint1 As Point2d
oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(50, 50)

Dim oView As DrawingView
oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint1, 1, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)
'oView = oSheet.DrawingViews.AddBaseView(oDoc,oPoint1, 1, ViewOrientationTypeEnum.kFrontViewOrientation, DrawingViewStyleEnum.kHiddenLineDrawingViewStyle)
oDoc.ReleaseReference
End If
0 Likes