Message 1 of 2

Not applicable
09-05-2016
05:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm looking for the way to make automatic drawings for parts in assembly. Not for all, only for part in the same folder, because I have particular template for this parts. The best would be if drawings will be in the same .idw file, each on a separate sheets.
Now I have this:
Imports Inventor.ViewOrientationTypeEnum Imports Inventor.DrawingViewStyleEnum Dim oDrawDoc as DrawingDocument Dim oPartDoc as Document Dim oSheet As sheet Dim oTG As TransientGeometry Dim oBaseView As DrawingView ViewScale = 1/10 'Ask To create drawing? dwgQuery=MsgBox("Czy chcesz stworzyć rysunek tego modelu?", vbYesNo,"Drawing Selection") If dwgQuery = vbYes Then oPartDoc = ThisDoc.Document 'Define IDW Template File Location oDrawDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, "C:\Users\Public\Documents\Autodesk\Inventor 2017\Templates\Nogi.idw", True) oSheet = oDrawDoc.Sheets.Item(1) 'Define 2d view bottom Left corner points For four views oPoint1 = ThisApplication.TransientGeometry.CreatePoint2d(5, 25) oPoint2 = ThisApplication.TransientGeometry.CreatePoint2d(12, 25) oPoint3 = ThisApplication.TransientGeometry.CreatePoint2d(19, 25) oPoint4 = ThisApplication.TransientGeometry.CreatePoint2d(26, 25) oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc,oPoint1, ViewScale ,kFrontViewOrientation, kHiddenLineRemovedDrawingViewStyle, "Default") oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc,oPoint2, ViewScale ,kRightViewOrientation, kHiddenLineRemovedDrawingViewStyle, "Default") oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc,oPoint3, ViewScale ,kBackViewOrientation, kHiddenLineRemovedDrawingViewStyle, "Default") oBaseView = oSheet.DrawingViews.AddBaseView(oPartDoc,oPoint4, ViewScale ,kLeftViewOrientation, kHiddenLineRemovedDrawingViewStyle, "Default") End If
It creates drawing for part with I have an open.
Sometimes I have 40 parts and this is really time-consuming to make drawings for all parts
My assembly looks that:
In folder "Nogi" I have parts to make drawings. In folder "Elementy" I have other parts, I don't need that drawings.
Is there any possibility to make this from Ilogic program from main Assembly?
Solved! Go to Solution.