<?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: Update threads in an old part to the current design data (thread.xls) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10885116#M41367</link>
    <description>&lt;P&gt;I'm am indeed able to create a new TapInfo object. I create this object using the properties of the existing hole. This works. The object is created, &lt;U&gt;and with the correct tap drill diameter&lt;/U&gt; (so thread.xls is involved in this operation).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't assign this new TapInfo object to the existing Hole feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Private Sub ThreadFix()
    Dim pDoc As PartDocument
    Set pDoc = ThisApplication.ActiveDocument
    Dim oCompdef As PartComponentDefinition
    Set oCompdef = pDoc.ComponentDefinition
    Dim oHole As HoleFeature
    Set oHole = oCompdef.Features.HoleFeatures.item(1)
    Dim oTappedHole As HoleTapInfo
    Set oTappedHole = oHole.TapInfo

    Dim newTappedHole As HoleTapInfo
    Set newTappedHole = oCompdef.Features.HoleFeatures.CreateTapInfo( _
                                RightHanded:=oTappedHole.RightHanded, _
                                ThreadType:=oTappedHole.ThreadType, _
                                ThreadDesignation:=oTappedHole.ThreadDesignation, _
                                Class:=oTappedHole.Class, _
                                FullTapDepth:=oTappedHole.FullTapDepth)

    Set oHole.TapInfo = newTappedHole   '&amp;lt;~~ Nope
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 12 Oct 2024 11:43:52 GMT</pubDate>
    <dc:creator>mr_ensing</dc:creator>
    <dc:date>2024-10-12T11:43:52Z</dc:date>
    <item>
      <title>Update threads in an old part to the current design data (thread.xls)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10884501#M41365</link>
      <description>&lt;P&gt;At some point in time we customised&amp;nbsp;thread.xls in the design data. The value we changed is&amp;nbsp;Tap Drill Diameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now and then we run into an older part. Changes to thread size of new features in the old part still use tap drill diameter dimensions according old design data. So, it seems the thread information is stored somewhere in the part file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Changing the tap drill diameter for the one hole isn't really that hard:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Dim pDoc As PartDocument
Set pDoc = ThisApplication.ActiveDocument
Debug.Print pDoc.ComponentDefinition.Features.HoleFeatures.item(1).TapInfo.TapDrillDiameter&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'd like to be able to update these old parts to the new table. Can't for the life of me find where this information is stored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2024 11:43:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10884501#M41365</guid>
      <dc:creator>mr_ensing</dc:creator>
      <dc:date>2024-10-12T11:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Update threads in an old part to the current design data (thread.xls)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10884950#M41366</link>
      <description>&lt;P&gt;I solved this few years ago, but I forgot how. It was necessary to create new TapInfo and I don't remember I can update an existing hole feature with new &lt;A href="https://help.autodesk.com/view/INVNTOR/2020/ENU/?guid=GUID-AAD46ECB-3B6F-4410-9B4A-851814D1435A" target="_blank" rel="noopener"&gt;TapInfo&lt;/A&gt;, or I need to create new one on the same place (geometry and model history). I hope the first approach is true.&lt;/P&gt;&lt;P&gt;All necessary information is stored in existing TapInfo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 14:16:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10884950#M41366</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2022-01-17T14:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update threads in an old part to the current design data (thread.xls)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10885116#M41367</link>
      <description>&lt;P&gt;I'm am indeed able to create a new TapInfo object. I create this object using the properties of the existing hole. This works. The object is created, &lt;U&gt;and with the correct tap drill diameter&lt;/U&gt; (so thread.xls is involved in this operation).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't assign this new TapInfo object to the existing Hole feature.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Private Sub ThreadFix()
    Dim pDoc As PartDocument
    Set pDoc = ThisApplication.ActiveDocument
    Dim oCompdef As PartComponentDefinition
    Set oCompdef = pDoc.ComponentDefinition
    Dim oHole As HoleFeature
    Set oHole = oCompdef.Features.HoleFeatures.item(1)
    Dim oTappedHole As HoleTapInfo
    Set oTappedHole = oHole.TapInfo

    Dim newTappedHole As HoleTapInfo
    Set newTappedHole = oCompdef.Features.HoleFeatures.CreateTapInfo( _
                                RightHanded:=oTappedHole.RightHanded, _
                                ThreadType:=oTappedHole.ThreadType, _
                                ThreadDesignation:=oTappedHole.ThreadDesignation, _
                                Class:=oTappedHole.Class, _
                                FullTapDepth:=oTappedHole.FullTapDepth)

    Set oHole.TapInfo = newTappedHole   '&amp;lt;~~ Nope
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2024 11:43:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10885116#M41367</guid>
      <dc:creator>mr_ensing</dc:creator>
      <dc:date>2024-10-12T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Update threads in an old part to the current design data (thread.xls)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10885280#M41368</link>
      <description>&lt;P&gt;Usually when it won't accept the new HoleTapInfo you created, it is because it can't find a single entry (row) in the 'thread.xls' file that matches all specifications in that HoleTapInfo.&amp;nbsp; You mentioned that you have edited the thread.xls file before.&amp;nbsp; Is that file still in the same location and still named exactly the same as how it was installed by Inventor?&amp;nbsp; The location of the 'Design Data' folder is specified in 2 main locations (Project settings, &amp;amp; Application Options - File tab), but I don't recall seeing a separate setting that would allow you to specify a different file to use instead of this one.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 16:12:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10885280#M41368</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2022-01-17T16:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Update threads in an old part to the current design data (thread.xls)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10886854#M41369</link>
      <description>&lt;P&gt;Design data are at a central location. They have been for years. And it works, because all recent parts have the tap diameters we changed in the thread.xls file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="visual-basic"&gt;Sub ThreadFix()
    Dim pDoc As PartDocument
    Set pDoc = ThisApplication.ActiveDocument
    Dim oCompdef As PartComponentDefinition
    Set oCompdef = pDoc.ComponentDefinition
    Dim oHole As HoleFeature
    Set oHole = oCompdef.Features.HoleFeatures.item(1)
    Dim oTappedHole As HoleTapInfo
    Set oTappedHole = oHole.TapInfo
    
    oTappedHole.TapDrillDiameter = 13.37 '&amp;lt;~~ wrong!
    
    Debug.Print "Before: " &amp;amp; oTappedHole.TapDrillDiameter       'Before: 13,37

    Dim newTappedHole As HoleTapInfo
    If oTappedHole.FullTapDepth Then
        Set newTappedHole = oCompdef.Features.HoleFeatures.CreateTapInfo( _
                                    RightHanded:=oTappedHole.RightHanded, _
                                    ThreadType:=oTappedHole.ThreadType, _
                                    ThreadDesignation:=oTappedHole.ThreadDesignation, _
                                    Class:=oTappedHole.Class, _
                                    FullTapDepth:=oTappedHole.FullTapDepth)
    Else
        Set newTappedHole = oCompdef.Features.HoleFeatures.CreateTapInfo( _
                                    RightHanded:=oTappedHole.RightHanded, _
                                    ThreadType:=oTappedHole.ThreadType, _
                                    ThreadDesignation:=oTappedHole.ThreadDesignation, _
                                    Class:=oTappedHole.Class, _
                                    FullTapDepth:=oTappedHole.FullTapDepth, _
                                    ThreadDepth:=oTappedHole.ThreadDepth)
    End If
                                
    Debug.Print "'After': " &amp;amp; newTappedHole.TapDrillDiameter    ''After': 10,4

    Set oHole.TapInfo = newTappedHole   '&amp;lt;~~ Nope&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new TapInfo object has the correct tap diameter. I just can't apply it to the existing hole feature.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Oct 2024 11:44:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10886854#M41369</guid>
      <dc:creator>mr_ensing</dc:creator>
      <dc:date>2024-10-12T11:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Update threads in an old part to the current design data (thread.xls)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10887010#M41370</link>
      <description>&lt;P&gt;You are on the right way. But you need to set the TheadDepth correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;oTappedHole.ThreadDepth returns Parameter object&lt;/LI&gt;&lt;LI&gt;CreateTapInfo method accepts string or double&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Change the line to&lt;/P&gt;&lt;P&gt;ThreadDepth :=oTappedHole.ThreadDepth.Value&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code works for me.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 08:47:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/update-threads-in-an-old-part-to-the-current-design-data-thread/m-p/10887010#M41370</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2022-01-18T08:47:45Z</dc:date>
    </item>
  </channel>
</rss>

