<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add-in to create section automatically in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9359729#M106677</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I just have one question that&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use frame generator to create stiffener, so it means that there are no work planes at the position of stiffener (because frame generator generate beams from sketch line). I want to make sections at the position of stiffeners by picking the part's edge (step 1) but it cannot work. Can you suggest me to do this task like this?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/737593iA57793B77E323693/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
    <pubDate>Thu, 05 Mar 2020 07:52:36 GMT</pubDate>
    <dc:creator>thanh.trantuan</dc:creator>
    <dc:date>2020-03-05T07:52:36Z</dc:date>
    <item>
      <title>Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9344693#M106358</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to write an add-in to create the sections automatically in Inventor drawing after basing the model&lt;/P&gt;&lt;P&gt;For example, I have a model like below picture with 3 longitudinal beams and 5 transverse beams&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Model.JPG" style="width: 922px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/734700i28B9C87287126BEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Model.JPG" alt="Model.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I base this model to Inventor drawing&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="basedDwg.JPG" style="width: 744px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/734701i8DE4D040AA927EFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="basedDwg.JPG" alt="basedDwg.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and create sections like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="section.JPG" style="width: 894px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/734702iD9948516B00ADD49/image-size/large?v=v2&amp;amp;px=999" role="button" title="section.JPG" alt="section.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could anyone suggest me the way to code the add-in to do this task automatically by using C#?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 04:33:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9344693#M106358</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-02-27T04:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9345146#M106371</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8706319"&gt;@thanh.trantuan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide non confidential files to test the feasibility.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 09:56:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9345146#M106371</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-02-27T09:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9345181#M106372</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;STRONG&gt;CHANDRA,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please see an attached model&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 10:10:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9345181#M106372</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-02-27T10:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354481#M106570</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8706319"&gt;@thanh.trantuan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for sample files to investigate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To section view in drawings, it is suggested to use workplanes as shown in below image. Later, same workplanes are used for creating section line and section views are added into drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WorkPlane_Creation.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/736560i9D798ED78DF77A14/image-size/large?v=v2&amp;amp;px=999" role="button" title="WorkPlane_Creation.png" alt="WorkPlane_Creation.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using below VBA code, section views are added into drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sub Section_View()
    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    Set oSheet = oDoc.ActiveSheet
    
    Dim oView As DrawingView
    Set oView = oSheet.DrawingViews.Item(1)
    
    Dim oComp As Document
    Set oComp = oView.ReferencedDocumentDescriptor.ReferencedDocument
    
    Dim wpCnt As Integer
    
    Dim i As Integer
    i = 1
    Dim h As Integer
    h = 1
    Dim v As Integer
    v = 1
    Dim wp As WorkPlane
    For wpCnt = 4 To oComp.ComponentDefinition.WorkPlanes.count
         
        Set wp = oComp.ComponentDefinition.WorkPlanes.Item(wpCnt)
        
        Call oView.SetIncludeStatus(wp, True)
        Call oView.SetVisibility(wp, False)
        
        Dim oSketch As DrawingSketch
        Set oSketch = oView.Sketches.Add
             
        Call oSketch.Edit
    
        Dim oStartPt As Point2d
        Set oStartPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).StartPoint.X, oSheet.Centerlines.Item(i).StartPoint.Y)
        
        Dim oStart As Point2d
        Set oStart = oView.SheetToDrawingViewSpace(oStartPt)
        
        Dim oEndPt As Point2d
        Set oEndPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).EndPoint.X, oSheet.Centerlines.Item(i).EndPoint.Y)
        
        Dim oEnd As Point2d
        Set oEnd = oView.SheetToDrawingViewSpace(oEndPt)
        
        Dim oLine As SketchLine
        Set oLine = oSketch.SketchLines.AddByTwoPoints(oStart, oEnd)
        
        Dim oPt As Point2d
        If oEnd.X = oStart.X Then
            Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width - (10 * v), oView.center.Y)
            Call oSketch.GeometricConstraints.AddVertical(oLine)
            v = v + 1
        Else
            Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oView.center.X, (10 * h))
            Call oSketch.GeometricConstraints.AddHorizontal(oLine)
            h = h + 1
        End If
        
        Call oSketch.ExitEdit
        
        Call oSheet.DrawingViews.AddSectionView(oView, oSketch, oPt, kFromBaseDrawingViewStyle)
        
        i = i + 1
    Next
    
    
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;To demonstrate the same, a screencast video is prepared and uploaded into below link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://autode.sk/2PI4wnq" target="_blank"&gt;https://autode.sk/2PI4wnq&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The modified assembly with workplanes is attached with this post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 06:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354481#M106570</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-03-03T06:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354611#M106574</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks your reply and it's highly appreciate your great support I have some questions, could you share your thought&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Firstly, in order to use your code, we have to create new planes which is constraint with existing structures. Could we have another way to do without create new planes like this. As you see, in the skeleton.ipt, these workplanes are created already, so can we use them to position the sketch lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, can we constraint these sketches after creating them&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thirdly, in the section properties, the section depth is full, could it be set up with the distance (such as 50 mm or 100mm) to show the section at this area only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 07:49:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354611#M106574</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-03-03T07:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354854#M106584</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to get longer section lines (text should be outside of the geometry)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you Georg&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 09:52:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354854#M106584</guid>
      <dc:creator>GeorgK</dc:creator>
      <dc:date>2020-03-03T09:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354910#M106585</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/241746"&gt;@GeorgK&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At below code, extension of lines can be added depends on line type (Like Horizontal or Vertical).&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;Dim oStartPt As Point2d
        Set oStartPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).StartPoint.X, oSheet.Centerlines.Item(i).StartPoint.Y)
        
        Dim oStart As Point2d
        Set oStart = oView.SheetToDrawingViewSpace(oStartPt)
        
        Dim oEndPt As Point2d
        Set oEndPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).EndPoint.X, oSheet.Centerlines.Item(i).EndPoint.Y)
        
        Dim oEnd As Point2d
        Set oEnd = oView.SheetToDrawingViewSpace(oEndPt)
        
        Dim oLine As SketchLine
        Set oLine = oSketch.SketchLines.AddByTwoPoints(oStart, oEnd)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 10:13:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9354910#M106585</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-03-03T10:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9355037#M106587</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8706319"&gt;@thanh.trantuan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Firstly, in order to use your code, we have to create new planes which is constraint with existing structures. Could we have another way to do without create new planes like this. As you see, in the skeleton.ipt, these workplanes are created already, so can we use them to position the sketch lines&lt;/FONT&gt; - The same code is modified to get planes from skeleton.ipt&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sub Section_View()
    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    Set oSheet = oDoc.ActiveSheet
    
    Dim oView As DrawingView
    Set oView = oSheet.DrawingViews.Item(1)
    
    Dim occ As ComponentOccurrence
    If oView.ReferencedDocumentDescriptor.ReferencedDocumentType = kAssemblyDocumentObject Then
        Dim oComp As AssemblyDocument
        Set oComp = oView.ReferencedDocumentDescriptor.ReferencedDocument
        
        Set occ = oComp.ComponentDefinition.Occurrences.ItemByName("Skeleton:1")
        
        Dim oSkeletonDoc As PartDocument
        Set oSkeletonDoc = occ.Definition.Document
    Else
        Exit Sub
    End If
    
    Dim wpCnt As Integer
    
    Dim i As Integer
    i = 1
    Dim h As Integer
    h = 1
    Dim v As Integer
    v = 1
    Dim wp As WorkPlane
    For Each wp In oSkeletonDoc.ComponentDefinition.WorkPlanes
         
        If wp.Name Like "T*" Or wp.Name Like "L*" Then
            Dim oProxy As WorkPlaneProxy
            Call occ.CreateGeometryProxy(wp, oProxy)
            Call oView.SetIncludeStatus(oProxy, True)
            Call oView.SetVisibility(oProxy, False)
            
            Dim oSketch As DrawingSketch
            Set oSketch = oView.Sketches.Add
                 
            Call oSketch.Edit
        
            Dim oStartPt As Point2d
            Set oStartPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).StartPoint.X, oSheet.Centerlines.Item(i).StartPoint.Y)
            
            Dim oStart As Point2d
            Set oStart = oView.SheetToDrawingViewSpace(oStartPt)
            
            Dim oEndPt As Point2d
            Set oEndPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).EndPoint.X, oSheet.Centerlines.Item(i).EndPoint.Y)
            
            Dim oEnd As Point2d
            Set oEnd = oView.SheetToDrawingViewSpace(oEndPt)
            
            Dim oLine As SketchLine
            Set oLine = oSketch.SketchLines.AddByTwoPoints(oStart, oEnd)
            
            Dim oPt As Point2d
            If oEnd.X = oStart.X Then
                Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width - (10 * v), oView.center.Y)
                Call oSketch.GeometricConstraints.AddVertical(oLine)
                v = v + 1
            Else
                Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oView.center.X, (10 * h))
                Call oSketch.GeometricConstraints.AddHorizontal(oLine)
                h = h + 1
            End If
            
            Call oSketch.ExitEdit
            
            Call oSheet.DrawingViews.AddSectionView(oView, oSketch, oPt, kFromBaseDrawingViewStyle)
            
            i = i + 1
        End If
    Next
    
    
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Secondly, can we constraint these sketches after creating them&lt;/FONT&gt; - Yes, it constrained to vertical or horizontal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Thirdly, in the section properties, the section depth is full, could it be set up with the distance (such as 50 mm or 100mm) to show the section at this area only.&lt;/FONT&gt; - Hoping the same answer to Geroge will help this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 11:30:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9355037#M106587</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-03-03T11:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9355101#M106588</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;,&amp;nbsp;&lt;P class="1583236713954"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="1583236713954"&gt;thanks for this. Would you mind adding bit of comments to each part describing what the code does.&amp;nbsp;&lt;/P&gt;&lt;P class="1583236713954"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="1583236713954"&gt;Best regards,&amp;nbsp;&lt;/P&gt;&lt;P class="1583236713954"&gt;Sam&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8706319"&gt;@thanh.trantuan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Firstly, in order to use your code, we have to create new planes which is constraint with existing structures. Could we have another way to do without create new planes like this. As you see, in the skeleton.ipt, these workplanes are created already, so can we use them to position the sketch lines&lt;/FONT&gt; - The same code is modified to get planes from skeleton.ipt&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sub Section_View()
    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    Set oSheet = oDoc.ActiveSheet
    
    Dim oView As DrawingView
    Set oView = oSheet.DrawingViews.Item(1)
    
    Dim occ As ComponentOccurrence
    If oView.ReferencedDocumentDescriptor.ReferencedDocumentType = kAssemblyDocumentObject Then
        Dim oComp As AssemblyDocument
        Set oComp = oView.ReferencedDocumentDescriptor.ReferencedDocument
        
        Set occ = oComp.ComponentDefinition.Occurrences.ItemByName("Skeleton:1")
        
        Dim oSkeletonDoc As PartDocument
        Set oSkeletonDoc = occ.Definition.Document
    Else
        Exit Sub
    End If
    
    Dim wpCnt As Integer
    
    Dim i As Integer
    i = 1
    Dim h As Integer
    h = 1
    Dim v As Integer
    v = 1
    Dim wp As WorkPlane
    For Each wp In oSkeletonDoc.ComponentDefinition.WorkPlanes
         
        If wp.Name Like "T*" Or wp.Name Like "L*" Then
            Dim oProxy As WorkPlaneProxy
            Call occ.CreateGeometryProxy(wp, oProxy)
            Call oView.SetIncludeStatus(oProxy, True)
            Call oView.SetVisibility(oProxy, False)
            
            Dim oSketch As DrawingSketch
            Set oSketch = oView.Sketches.Add
                 
            Call oSketch.Edit
        
            Dim oStartPt As Point2d
            Set oStartPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).StartPoint.X, oSheet.Centerlines.Item(i).StartPoint.Y)
            
            Dim oStart As Point2d
            Set oStart = oView.SheetToDrawingViewSpace(oStartPt)
            
            Dim oEndPt As Point2d
            Set oEndPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).EndPoint.X, oSheet.Centerlines.Item(i).EndPoint.Y)
            
            Dim oEnd As Point2d
            Set oEnd = oView.SheetToDrawingViewSpace(oEndPt)
            
            Dim oLine As SketchLine
            Set oLine = oSketch.SketchLines.AddByTwoPoints(oStart, oEnd)
            
            Dim oPt As Point2d
            If oEnd.X = oStart.X Then
                Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width - (10 * v), oView.center.Y)
                Call oSketch.GeometricConstraints.AddVertical(oLine)
                v = v + 1
            Else
                Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oView.center.X, (10 * h))
                Call oSketch.GeometricConstraints.AddHorizontal(oLine)
                h = h + 1
            End If
            
            Call oSketch.ExitEdit
            
            Call oSheet.DrawingViews.AddSectionView(oView, oSketch, oPt, kFromBaseDrawingViewStyle)
            
            i = i + 1
        End If
    Next
    
    
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Secondly, can we constraint these sketches after creating them&lt;/FONT&gt; - Yes, it constrained to vertical or horizontal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Thirdly, in the section properties, the section depth is full, could it be set up with the distance (such as 50 mm or 100mm) to show the section at this area only.&lt;/FONT&gt; - Hoping the same answer to Geroge will help this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 11:59:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9355101#M106588</guid>
      <dc:creator>sam</dc:creator>
      <dc:date>2020-03-03T11:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9357178#M106620</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your great support&lt;/P&gt;&lt;P&gt;Regarding to 3rd question, I mean the depth value when we edit section properties. Section depth is "distance" instead of "Full"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 481px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/737071iF0A830DBE0EB030B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Besides, I try to arrange the section, break the alignment and rotate the vertical section&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/737074iB3179FC10AEC3FEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.JPG" alt="3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I see that in your code, the distance between each section can be controlled, so how about rotate these vertical sections?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 09:21:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9357178#M106620</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-03-04T09:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9359639#M106668</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8706319"&gt;@thanh.trantuan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below code to change depth of section and rotate the section view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dim oSection As SectionDrawingView
            Set oSection = oSheet.DrawingViews.AddSectionView(oView, oSketch, oPt, kFromBaseDrawingViewStyle)
            
            oSection.SectionDepth = 127
            
            Call oSection.RotateByAngle(1.57, True)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Full modified code is as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sub Section_View()
    Dim oDoc As DrawingDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oSheet As Sheet
    Set oSheet = oDoc.ActiveSheet
    
    Dim oView As DrawingView
    Set oView = oSheet.DrawingViews.Item(1)
    
    Dim occ As ComponentOccurrence
    If oView.ReferencedDocumentDescriptor.ReferencedDocumentType = kAssemblyDocumentObject Then
        Dim oComp As AssemblyDocument
        Set oComp = oView.ReferencedDocumentDescriptor.ReferencedDocument
        
        Set occ = oComp.ComponentDefinition.Occurrences.ItemByName("Skeleton:1")
        
        Dim oSkeletonDoc As PartDocument
        Set oSkeletonDoc = occ.Definition.Document
    Else
        Exit Sub
    End If
    
    Dim wpCnt As Integer
    
    Dim i As Integer
    i = 1
    Dim h As Integer
    h = 1
    Dim v As Integer
    v = 1
    Dim wp As WorkPlane
    For Each wp In oSkeletonDoc.ComponentDefinition.WorkPlanes
         
        If wp.Name Like "T*" Or wp.Name Like "L*" Then
            Dim oProxy As WorkPlaneProxy
            Call occ.CreateGeometryProxy(wp, oProxy)
            Call oView.SetIncludeStatus(oProxy, True)
            Call oView.SetVisibility(oProxy, False)
            
            Dim oSketch As DrawingSketch
            Set oSketch = oView.Sketches.Add
                 
            Call oSketch.Edit
        
            Dim oStartPt As Point2d
            Set oStartPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).StartPoint.X, oSheet.Centerlines.Item(i).StartPoint.Y)
            
            Dim oStart As Point2d
            Set oStart = oView.SheetToDrawingViewSpace(oStartPt)
            
            Dim oEndPt As Point2d
            Set oEndPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Centerlines.Item(i).EndPoint.X, oSheet.Centerlines.Item(i).EndPoint.Y)
            
            Dim oEnd As Point2d
            Set oEnd = oView.SheetToDrawingViewSpace(oEndPt)
            
            Dim oLine As SketchLine
            Set oLine = oSketch.SketchLines.AddByTwoPoints(oStart, oEnd)
            
            Dim oPt As Point2d
            If oEnd.X = oStart.X Then
                Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oSheet.Width - (10 * v), oView.center.Y)
                Call oSketch.GeometricConstraints.AddVertical(oLine)
                v = v + 1
            Else
                Set oPt = ThisApplication.TransientGeometry.CreatePoint2d(oView.center.X, (10 * h))
                Call oSketch.GeometricConstraints.AddHorizontal(oLine)
                h = h + 1
            End If
            
            Call oSketch.ExitEdit
            
            Dim oSection As SectionDrawingView
            Set oSection = oSheet.DrawingViews.AddSectionView(oView, oSketch, oPt, kFromBaseDrawingViewStyle)
            
            oSection.SectionDepth = 127
            
            Call oSection.RotateByAngle(1.57, True)
            
            i = i + 1
        End If
    Next
    
    
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 06:51:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9359639#M106668</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-03-05T06:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9359669#M106671</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your support, it's all clear now&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 07:14:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9359669#M106671</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-03-05T07:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9359729#M106677</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I just have one question that&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use frame generator to create stiffener, so it means that there are no work planes at the position of stiffener (because frame generator generate beams from sketch line). I want to make sections at the position of stiffeners by picking the part's edge (step 1) but it cannot work. Can you suggest me to do this task like this?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/737593iA57793B77E323693/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 07:52:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9359729#M106677</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-03-05T07:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9365857#M106786</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please take a look this question and give me any supports&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I just have one question that&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use frame generator to create stiffener, so it means that there are no work planes at the position of stiffener (because frame generator generate beams from sketch line). I want to make sections at the position of stiffeners by picking the part's edge (step 1) but it cannot work. Can you suggest me to do this task like this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/737593iA57793B77E323693/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 04:26:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9365857#M106786</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-03-09T04:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9365902#M106787</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8706319"&gt;@thanh.trantuan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you trying through UI?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide non confidential drawing files and supporting files to test the feasibility.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 05:18:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9365902#M106787</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-03-09T05:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9365947#M106788</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached model here, please take a look&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Besides, if it's possible, may I ask for help about&amp;nbsp;customizing the text format of the section view like picture below by using VBA&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.JPG" style="width: 698px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/738913iCFDBCA402D862ECA/image-dimensions/698x634?v=v2" width="698" height="634" role="button" title="11.JPG" alt="11.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;there are 2 options, firstly is change single text of the section view, secondly is change all text of the all section view within the drawing sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 06:21:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9365947#M106788</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-03-09T06:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9366256#M106795</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8706319"&gt;@thanh.trantuan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try below code to change the label of drawing view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Dim oSection As SectionDrawingView
            Set oSection = oSheet.DrawingViews.AddSectionView(oView, oSketch, oPt, kFromBaseDrawingViewStyle)
            
            oSection.Label.FormattedText = "&amp;lt;StyleOverride Bold='True' Underline='True' FontSize='0.8'&amp;gt;SECTION &amp;lt;DrawingViewName/&amp;gt;-&amp;lt;DrawingViewName/&amp;gt;&amp;lt;/StyleOverride&amp;gt;&amp;lt;Br/&amp;gt;SCALE &amp;lt;DrawingViewScale/&amp;gt;"
            &lt;/LI-CODE&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 10:22:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9366256#M106795</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2020-03-09T10:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add-in to create section automatically</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9373701#M106902</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4427777"&gt;@chandra.shekar.g&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much, so how about the question&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Sorry, I just have one question that&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use frame generator to create stiffener, so it means that there are no work planes at the position of stiffener (because frame generator generate beams from sketch line). I want to make sections at the position of stiffeners by picking the part's edge (step 1) but it cannot work. Can you suggest me to do this task like this?"&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/737593iA57793B77E323693/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;could you give me any clues about this?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 09:30:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-in-to-create-section-automatically/m-p/9373701#M106902</guid>
      <dc:creator>thanh.trantuan</dc:creator>
      <dc:date>2020-03-12T09:30:35Z</dc:date>
    </item>
  </channel>
</rss>

