Message 1 of 2
Sheet Metal Drawing automation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
IS THERE ANY POSSIBITY TO AUTOMATE THIS PROCESS?
- FROM ASSEMBLY OPEN SHEETMETAL COMPONENTS ONE BY ONE
- OPEN DRAFTING FILE ANSI.idw (PATH - "C:\Users\Public\Documents\Autodesk\Inventor 2023\Templates\en-US\Metric\ANSI (mm).idw")
- VIEW1 = PLACE BASE VIEW (Flat Pattern (Sheet Metal View)) (Style = Hidden Line Removed)
- VIEW2 = PLACE ISOMATRIC VIEW (Style = Hidden Line Removed)
- FOR THE SCALE AND POSITION OF THIS TWO VIEW CONSIDE FOLLOWING CODE
If ActiveSheet.View("VIEW1").Height < 250 Then
ActiveSheet.View("VIEW1").Scale = 0.6
ActiveSheet.View("VIEW1").SetCenter(175, 222)
ActiveSheet.View("VIEW2").SetCenter(450,262.5)
ElseIf ActiveSheet.View("VIEW1").Height < 500 Then
ActiveSheet.View("VIEW1").Scale = 0.4
ActiveSheet.View("VIEW1").SetCenter(175, 222)
ActiveSheet.View("VIEW2").SetCenter(450,262.5)
ElseIf ActiveSheet.View("VIEW1").Height < 1000 Then
ActiveSheet.View("VIEW1").Scale = 1/4.5
ActiveSheet.View("VIEW1").SetCenter(175, 222)
ActiveSheet.View("VIEW2").SetCenter(450,262.5)
End If
ActiveSheet.View("VIEW2").Scale = ActiveSheet.View("VIEW1").Scale
- GIVE BEND ANNOTATION (FOR BEND ANNOTATION USE FOLLOWING CODE)
Dim oDoc As DrawingDocument
Dim oSheet As Sheet
Dim oView As DrawingView
Dim oCurve As DrawingCurve
Dim oBendNote As BendNote
Dim BendNoteCount As Integer
oDoc = ThisApplication.ActiveDocument
oSheet = oDoc.ActiveSheet
BendNoteCount = oSheet.DrawingNotes.BendNotes.Count
If BendNoteCount=0 Then
'[add bend notes to views
For Each oView In oSheet.DrawingViews
For Each oCurve In oView.DrawingCurves
If oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendDownEdge _
Or oCurve.EdgeType = Inventor.DrawingEdgeTypeEnum.kBendUpEdge Then
' Create the bend note
oBendNote = oSheet.DrawingNotes.BendNotes.Add(oCurve)
End If
Next 'oCurve
Next ']oView
Else
'do nothing
End If
- SAVE IDW FILE (IF POSSIBLE, FILE NAME SHOULD BE LIKE <PART NO> & <MATERIAL> & <THIKNESS>
- EXPORT DWG FILE WITH SAME NAME
- EXPORT PDF FILE WITH SAME NAME
SAVE THESE FILES IN TO SAME FOLDER