<?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 dont export hole with thread? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12442302#M15563</link>
    <description>&lt;P&gt;Hi, if you can commit to make the holes with a feature, be it hole, cut, extrusion or else, you could add a tag to the featurename, like "suppress" or "nodxf" and then suppress all features that include this tag like&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10947197"&gt;@yuzeaa&lt;/a&gt;&amp;nbsp;proposed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you could use a punchtool for these holes, in this case you can define how the holes are shown in the flatpattern&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-1A5F9CD1-80A8-4462-894A-4D8C9DFCDB51" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-1A5F9CD1-80A8-4462-894A-4D8C9DFCDB51&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 12:17:14 GMT</pubDate>
    <dc:creator>jeremy.goenen</dc:creator>
    <dc:date>2023-12-15T12:17:14Z</dc:date>
    <item>
      <title>How dont export hole with thread?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12440900#M15559</link>
      <description>&lt;P&gt;Hello Everyone,&lt;BR /&gt;&lt;BR /&gt;I am trying to make a code to automatize export to DXF Flat Sheet Metal.&amp;nbsp;&lt;BR /&gt;When i export a Sheet with&amp;nbsp;thread hole.&lt;BR /&gt;This holes have M12, when i export with DN 12mm.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this case, if hole have thread I would like these holes not to be exported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Leonardo_Czuy_0-1702554208706.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1304712i4776A2FC90C73E69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Leonardo_Czuy_0-1702554208706.png" alt="Leonardo_Czuy_0-1702554208706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Leonardo_Czuy_1-1702554269414.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1304713i84454A0EC4123D99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Leonardo_Czuy_1-1702554269414.png" alt="Leonardo_Czuy_1-1702554269414.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;For Each oRefDoc In oRefDocs
	iptPathName = Left(oRefDoc.FullDocumentName, Len(oRefDoc.FullDocumentName) - 3) &amp;amp; "ipt"
	If (Not System.IO.File.Exists(iptPathName)) Then Continue For
		
	Dim oDrawDoc As PartDocument
	oDrawDoc = ThisApplication.Documents.Open(iptPathName, True)
	oFileName = Left(oRefDoc.DisplayName, Len(oRefDoc.DisplayName))
	
	Dim quantidadeDePecas As String = "QTDE: " &amp;amp; oAsmDoc.ComponentDefinition.Occurrences.AllReferencedOccurrences(oRefDoc).Count
	
	'Set the DXF target file name
	Try
		Dim CustomName As String
		Try
			CustomName = iProperties.Value(oFileName, "Project", "Part number")
			CustomName = CustomName.replace("/", "-")
		Catch
			CustomName = oFileName
		End Try
		
		oDataMedium.FileName = oFolder &amp;amp; "\" &amp;amp; CustomName &amp;amp; ".dxf"
		
		Dim oCompDef As SheetMetalComponentDefinition
		oCompDef = oDrawDoc.ComponentDefinition
	

		If oCompDef.HasFlatPattern = False Then
			oCompDef.Unfold
		Else
			oCompDef.FlatPattern.Edit
		End If
		
		For Each oFeature As PartFeature In oCompDef.Features
			If oFeature.Type = kThreadFeatureObject Then
				
			End If
		Next
		
		Dim sOut As String
		sOut = "FLAT PATTERN DXF?AcadVersion=2004&amp;amp;" &amp;amp; _
		"OuterProfileLayer=CONTORNI&amp;amp;OuterProfileLayerColor=255;255;0&amp;amp;" &amp;amp; _
		"InteriorProfilesLayer=CONTORNI&amp;amp;InteriorProfilesLayerColor=255;255;0&amp;amp;" &amp;amp; _
		"TangentLayer=SOTTILI&amp;amp;TangentLayerColor=255;0;0&amp;amp;" &amp;amp; _
		"BendLayer=SOTTILI&amp;amp;BendLayerColor=255;0;0&amp;amp;" &amp;amp; _
		"BendUpLayerColor=255;0;0&amp;amp;BendDownLayerColor=255;0;0&amp;amp;" &amp;amp; _
		"InvisibleLayers=IV_ARC_CENTERS;IV_FEATURE_PROFILES;IV_FEATURE_PROFILES_DOWN"
		oCompDef.DataIO.WriteDataToFile(sOut, oDataMedium.FileName)
		AddDXFProperties(oDrawDoc, oDataMedium.FileName, quantidadeDePecas ,False)
		oCompDef.FlatPattern.ExitEdit
	Catch
	End Try
	oDrawDoc.Close
Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 11:47:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12440900#M15559</guid>
      <dc:creator>Leonardo_Czuy</dc:creator>
      <dc:date>2023-12-14T11:47:46Z</dc:date>
    </item>
    <item>
      <title>回复： How dont export hole with thread?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12441032#M15560</link>
      <description>&lt;P&gt;This method may not look good, but it may be feasible. You can try it out&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim threadHoles As New List(Of HoleFeature)
For Each Hole As HoleFeature In refdoc.ComponentDefinition.Features.HoleFeatures
	If Hole.HealthStatus = HealthStatusEnum.kSuppressedHealth Then Continue For
	If  Hole.TapInfo IsNot Nothing Then 
		threadHoles.Add(Hole)
		Hole.Suppressed = True
	End If
Next
'start
'export dxf
'end
For Each hole As HoleFeature In threadHoles
	hole.Suppressed = False
Next&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Dec 2023 12:56:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12441032#M15560</guid>
      <dc:creator>yuzeaa</dc:creator>
      <dc:date>2023-12-14T12:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: How dont export hole with thread?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12441124#M15561</link>
      <description>&lt;P&gt;It's possible to add attributes to edges. With those attributes, you can&lt;A href="https://modthemachine.typepad.com/my_weblog/2009/04/controlling-layers-in-your-flat-pattern-export.html" target="_blank" rel="noopener"&gt; control the layer that the edge will get during export&lt;/A&gt;. So if assign an attribute to the edges of holes with thread, then you control the layer of those edges. If you hide those layers during export then you get what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following iLogic rule will add attributes to edges that belong to holes with thread. You should see that they get exported to the layer "HideFromExport"&lt;/P&gt;
&lt;LI-CODE lang="visual-basic"&gt;Dim setName As String = "FlatPatternAttributes"
Dim attName As String = "LayerName"
Dim attValue As String = "HideFromExport"

Dim doc As PartDocument = ThisDoc.Document
Dim def As SheetMetalComponentDefinition = doc.ComponentDefinition

Dim flatPattern = def.FlatPattern
Dim topFace = flatPattern.TopFace
Dim circuarEdges = topFace.Edges.Cast(Of Edge).Where(Function(e) e.GeometryType = CurveTypeEnum.kCircleCurve)
Dim foundEdges = ThisApplication.TransientObjects.CreateObjectCollection

For Each edge As Edge In circuarEdges

    For Each face As Face In edge.Faces
        Dim feature As PartFeature = face.CreatedByFeature
        If (TypeOf feature Is HoleFeature) Then
            Dim hole As HoleFeature = feature

            If (hole.HoleType = HoleTypeEnum.kDrilledHole) Then
                foundEdges.Add(edge)

                Dim attSet As AttributeSet = Nothing
                If (edge.AttributeSets.NameIsUsed(setName)) Then
                    attSet = edge.AttributeSets.Item(setName)
                Else
                    attSet = edge.AttributeSets.Add(setName)
                End If
                If (attSet.NameIsUsed(attName)) Then
                    Dim attribute = attSet.Item(attName).Value = attValue
                Else
                    attSet.Add(attName, ValueTypeEnum.kStringType, attValue)
                End If
            End If
        End If
    Next
Next

doc.SelectSet.Clear()
doc.SelectSet.SelectMultiple(foundEdges)
MsgBox("Found edges: " &amp;amp; foundEdges.Count)&lt;/LI-CODE&gt;
&lt;P&gt;There are some disadvantages to using attributes.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;There is no way of viewing attributes with the Inventor. You need an addin to view them (like '&lt;A href="https://ekinssolutions.com/nifty_attributes/" target="_blank" rel="noopener"&gt;Nifty Attributes&lt;/A&gt;') or you can use my iLogic rule to change layer names. "&lt;A href="http://www.hjalte.nl/18-setting-extra-layers-in-dxf-exports" target="_blank" rel="noopener"&gt;Setting Extra Layers In DXF Exports&lt;/A&gt;"&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;This rule will add attributes to edges but will never remove them. So I'm not sure what would happen if you change your hole type from a hole with thread and then remove the thread. It's possible that the attribute stays and your hole without thread is still removed from export.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 13:34:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12441124#M15561</guid>
      <dc:creator>JelteDeJong</dc:creator>
      <dc:date>2023-12-14T13:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: How dont export hole with thread?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12441481#M15562</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt; and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5011186"&gt;@JelteDeJong&lt;/a&gt;, thanks a lot for helping, but have one problem&lt;BR /&gt;&lt;BR /&gt;What can i do when hole is draw in&amp;nbsp;&lt;SPAN&gt;sketch?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Leonardo_Czuy_0-1702567527541.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1304852i141D2402104E6CD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Leonardo_Czuy_0-1702567527541.png" alt="Leonardo_Czuy_0-1702567527541.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Leonardo_Czuy_1-1702567593860.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1304855i15BBDB4F374CBCD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Leonardo_Czuy_1-1702567593860.png" alt="Leonardo_Czuy_1-1702567593860.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 15:26:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12441481#M15562</guid>
      <dc:creator>Leonardo_Czuy</dc:creator>
      <dc:date>2023-12-14T15:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How dont export hole with thread?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12442302#M15563</link>
      <description>&lt;P&gt;Hi, if you can commit to make the holes with a feature, be it hole, cut, extrusion or else, you could add a tag to the featurename, like "suppress" or "nodxf" and then suppress all features that include this tag like&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10947197"&gt;@yuzeaa&lt;/a&gt;&amp;nbsp;proposed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you could use a punchtool for these holes, in this case you can define how the holes are shown in the flatpattern&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-1A5F9CD1-80A8-4462-894A-4D8C9DFCDB51" target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-1A5F9CD1-80A8-4462-894A-4D8C9DFCDB51&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 12:17:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-dont-export-hole-with-thread/m-p/12442302#M15563</guid>
      <dc:creator>jeremy.goenen</dc:creator>
      <dc:date>2023-12-15T12:17:14Z</dc:date>
    </item>
  </channel>
</rss>

