<?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: How to split a surface from rectangular pattern feature occurrence in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8117012#M87129</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please take a look at the attached file in my previous post.&lt;/P&gt;&lt;P&gt;This will explain my idea...&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jul 2018 07:09:34 GMT</pubDate>
    <dc:creator>bradeneuropeArthur</dc:creator>
    <dc:date>2018-07-09T07:09:34Z</dc:date>
    <item>
      <title>How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106545#M87121</link>
      <description>&lt;P&gt;Hi everybody,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a surface with random boundary. I want to split it to many smaller surface. But i can not find out the&amp;nbsp;way quickly.&lt;/P&gt;&lt;P&gt;Currently, I&amp;nbsp;import a autocad file, create&amp;nbsp;a boundary patch surface, create a rectangular sketch and extrude surface.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Split extrude surface. Pattern extrude surface to continue split.&lt;/P&gt;&lt;P&gt;But now, i can not split from pattern elements. How should i do ?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Here is my code.&lt;/P&gt;&lt;PRE&gt;Private Sub CommandButton3_Click()
Dim dientich As Double

' Dim oDoc As PartDocument
 '   Set oDoc = ThisApplication.Documents.Add(kPartDocumentObject)
    Dim oDoc As PartDocument
    Set oDoc = ThisApplication.Documents.Add(kPartDocumentObject, _
    ThisApplication.FileManager.GetTemplateFile(kPartDocumentObject, kMetricSystemOfMeasure))
    Dim oCompDef As PartComponentDefinition
    Set oCompDef = oDoc.ComponentDefinition
    
    Dim oRefComponents As ReferenceComponents
    Set oRefComponents = oCompDef.ReferenceComponents
    
    ' Create a ImportedComponentDefinition based on an AutoCAD file.    Dim oImportedCompDef As ImportedComponentDefinition
    Set oImportedCompDef = oRefComponents.ImportedComponents.CreateDefinition("C:\Users\Sand Man\Desktop\Drawing1.dwg")
    
    Dim oImportedDWGDef As ImportedDWGComponentDefinition
    
    If oImportedCompDef.Type = kImportedDWGComponentDefinitionObject Then
        Set oImportedDWGDef = oImportedCompDef
    Else
        End
    End If
    
    Dim oMatrix As Matrix
    Set oMatrix = ThisApplication.TransientGeometry.CreateMatrix
    oMatrix.SetTranslation ThisApplication.TransientGeometry.CreateVector(0, 0, 10)
    
    oImportedDWGDef.Transformation = oMatrix
    
    ' Create the ImportedComponent
    Dim oImportedComponent As ImportedComponent
    Set oImportedComponent = oRefComponents.ImportedComponents.Add(oImportedDWGDef)
    
    Dim oImportedDWGComponent As ImportedDWGComponent
    
    If oImportedComponent.Type = kImportedDWGComponentObject Then
        Set oImportedDWGComponent = oImportedComponent
        
        Dim oSk As PlanarSketch
        Set oSk = oCompDef.Sketches.Add(oCompDef.WorkPlanes(3))
        
        ' Get the DWGBlockDefinition for model space.        Dim oDWGModelSpaceDef As DWGBlockDefinition
        Set oDWGModelSpaceDef = oImportedDWGComponent.ModelSpaceDefinition
        
        ' Project DWG entities to planar sketch.
        Dim oDWGEntity As DWGEntity
        For Each oDWGEntity In oDWGModelSpaceDef.Entities
         
            Call oSk.AddByProjectingEntity(oDWGEntity)
        Next
    End If
oImportedDWGComponent.Visible = False
Dim oProfile As Profile
Set oProfile = oSk.Profiles.AddForSurface


Dim opatchdef As BoundaryPatchDefinition
Set opatchdef = oCompDef.Features.BoundaryPatchFeatures.CreateBoundaryPatchDefinition
opatchdef.BoundaryPatchLoops.Add oProfile

Dim opatchsurface As BoundaryPatchFeature
Set opatchsurface = oCompDef.Features.BoundaryPatchFeatures.Add(opatchdef)

Dim oFrontFace As Face
Set oFrontFace = opatchsurface.Faces.Item(1)

'Dim odientichtoanbo As Double
'odientichtoanbo = oFrontFace.Evaluator.Area
'Set oFrontFace = oextrude.StartFaces.Item(1)

''''''''''''''''''
Dim oWorkplanes As WorkPlanes
Set oWorkplanes = oDoc.ComponentDefinition.WorkPlanes

Dim oWorkplane As WORKPLANE
'Set oWorkplane = oPartDoc.

Dim oSketch As PlanarSketch
Set oSketch = oCompDef.Sketches.Add(oFrontFace, False)


Dim oTransi As TransientGeometry
Set oTransi = ThisApplication.TransientGeometry


Dim oRectangleLines As SketchEntitiesEnumerator
Set oRectangleLines = oSketch.SketchLines.AddAsTwoPointRectangle( _
oTransi.CreatePoint2d(0, 0), _
oTransi.CreatePoint2d(5, 15))

Set oProfile = oSketch.Profiles.AddForSurface

Dim oextrude As ExtrudeFeature
Set oextrude = oCompDef.Features.ExtrudeFeatures.AddByDistanceExtent(oProfile, 5, kSymmetricExtentDirection, kSurfaceOperation)
'Dim o2dpath As SplitFeature
'Set o2dpath = oCompDef.Features.CreatePath(oRectangleLines)
 Dim osur As SurfaceBody
 Set osur = opatchsurface.SurfaceBodies.Item(1)
Dim oworksface As WorkSurface
Set oworksface = oextrude.SurfaceBody.Parent

Dim oSplit As SplitFeature
Set oSplit = oCompDef.Features.SplitFeatures.SplitFaces(oworksface, True, osur)
oworksface.Visible = False
'pattern
Dim opartdef As PartComponentDefinition
Set opartdef = oDoc.ComponentDefinition
Dim ocolextrude As ObjectCollection
Set ocolextrude = ThisApplication.TransientObjects.CreateObjectCollection
Call ocolextrude.Add(oextrude)

Dim orecpa As RectangularPatternFeature
Set orecpa = oCompDef.Features.RectangularPatternFeatures.Add(ocolextrude, opartdef.WorkAxes.Item(1), False, 6, 5, kDefault, , opartdef.WorkAxes.Item(2), True, 5, 15, kDefault, , kIdenticalCompute)

 'For i = 9 To 12
'orecpa.PatternElements.Item(i).Suppressed = True
'Next
'Dim obodyi As WorkSurface
'Set obodyi = orecpa.PatternElements.Item(3).Parent
'Set obodyi = orecpa.SurfaceBodies.Item(1)

Set oSplit = oCompDef.Features.SplitFeatures.SplitFaces(odofyi, True, osur)

 ThisApplication.CommandManager.ControlDefinitions.Item("AppViewCubeHomeCmd").Execute
oDoc.Update
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 10:56:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106545#M87121</guid>
      <dc:creator>SandmanINV</dc:creator>
      <dc:date>2018-07-03T10:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106587#M87122</link>
      <description>could you upload a picture or a file with what you need?</description>
      <pubDate>Tue, 03 Jul 2018 11:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106587#M87122</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-07-03T11:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106649#M87123</link>
      <description>&lt;P&gt;Thank you for your help. Here is my picture. I split by hand in this file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/518821i6F0B8E3A7FE3562E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 11:54:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106649#M87123</guid>
      <dc:creator>SandmanINV</dc:creator>
      <dc:date>2018-07-03T11:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106654#M87124</link>
      <description>could you show me the picture without the splits too?</description>
      <pubDate>Tue, 03 Jul 2018 11:57:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106654#M87124</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-07-03T11:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106672#M87125</link>
      <description>&lt;P&gt;I want inventor split any surface with a rectangular.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/518823i5F22F0600E7B1124/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 12:03:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106672#M87125</guid>
      <dc:creator>SandmanINV</dc:creator>
      <dc:date>2018-07-03T12:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106708#M87126</link>
      <description>&lt;P&gt;Maybe this is an idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 12:20:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8106708#M87126</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-07-03T12:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8112683#M87127</link>
      <description>i dont understand your mind. Can you explain more ?&lt;BR /&gt;Thank you.&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jul 2018 23:37:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8112683#M87127</guid>
      <dc:creator>SandmanINV</dc:creator>
      <dc:date>2018-07-05T23:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8115732#M87128</link>
      <description>&lt;P&gt;Can any body help, pls&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 18:15:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8115732#M87128</guid>
      <dc:creator>SandmanINV</dc:creator>
      <dc:date>2018-07-07T18:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8117012#M87129</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please take a look at the attached file in my previous post.&lt;/P&gt;&lt;P&gt;This will explain my idea...&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 07:09:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8117012#M87129</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-07-09T07:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8118757#M87130</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your idea. I opened your file. But maybe i am stupid. I don't understand what you mind ?&lt;/P&gt;&lt;P&gt;like my picture i uploaded , i want to split a surface with random boundary line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My way is extrude surface and split mother surface tho many child surfaces automatically.&amp;nbsp;&lt;/P&gt;&lt;P&gt;After saw your part, i dont understand how to solve my problem...&lt;/P&gt;&lt;P&gt;Thanks you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jul 2018 19:21:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8118757#M87130</guid>
      <dc:creator>SandmanINV</dc:creator>
      <dc:date>2018-07-09T19:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a surface from rectangular pattern feature occurrence</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8119574#M87131</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried it to do a different way.&lt;/P&gt;&lt;P&gt;I made the separate surfaces already and then I made the pattern.&lt;/P&gt;&lt;P&gt;This is much easier regarding the split method. because you don't need it, to my opinion.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Autodesk Software:&lt;/STRONG&gt; Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018&lt;BR /&gt;&lt;STRONG&gt;Programming Skills:&lt;/STRONG&gt; Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ideas/dimension-component-part-and-assembly/idi-p/7523011" target="_blank"&gt;Dimension Component!&lt;/A&gt; | &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/export-partlist-default-configuration/idc-p/7422221#M21416" target="_blank"&gt;Partlist Export!&lt;/A&gt; | &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/derived-part-and-assembly-copy-i-properties/idi-p/6349392" target="_blank"&gt;Derive I-properties!&lt;/A&gt; | &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/inventor-vault-prompts-settings-amp-vault-prompts-settings-via/idi-p/7641767" target="_blank"&gt;Vault Prompts Via API!&lt;/A&gt; | &lt;A href="https://forums.autodesk.com/t5/vault-ideas/vault-professional-handbook-or-manual-to-be-provided/idi-p/7653669" target="_blank"&gt;Vault Handbook/Manual!&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-ideas/drawing-toggle-sheets/idi-p/7708757" target="_blank"&gt;Drawing Toggle Sheets!&lt;/A&gt; | &lt;A href="https://forums.autodesk.com/t5/inventor-ideas/open-files-automatically-with-quot-defer-update-quot-on-read/idi-p/7762709" target="_blank"&gt;Vault Defer Update!&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;! For administrative reasons, please mark a &lt;STRONG&gt;"Solution as solved"&lt;/STRONG&gt; when the issue is solved !&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 06:06:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-to-split-a-surface-from-rectangular-pattern-feature/m-p/8119574#M87131</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2018-07-10T06:06:12Z</dc:date>
    </item>
  </channel>
</rss>

