TaperedThreadInfo Throws an unspecified error.

TaperedThreadInfo Throws an unspecified error.

Eric.Mathews120
Contributor Contributor
273 Views
0 Replies
Message 1 of 1

TaperedThreadInfo Throws an unspecified error.

Eric.Mathews120
Contributor
Contributor

The TaperedThreadInfo object throws an error on two different machines with different parts on both INV2016 and INV2017 every time. Is this the correct way to set an NPT type tapered thread? To be fair, I'm using the 2019 Inventor interop, but it works on everything else.

 

                try
                {
                    TaperedThreadInfo _taperedThreadInfo = (TaperedThreadInfo)_prtDef.Features.HoleFeatures[_holeFeatureName].TapInfo;
                    bool _rightHanded = _taperedThreadInfo.RightHanded;
                    string _threadType = _taperedThreadInfo.ThreadType;                    
                    
                    // Create a new tapered thread object.
// This line throws an error under every circumstance. TaperedThreadInfo _holeTaperedThread = _prtDef.Features.HoleFeatures.CreateTaperedTapInfo( _rightHanded, _threadType, "3/4 - 14 NPT"); // Set a reference to the hole feature to be changed. HoleFeature _holeFeature = _prtDef.Features.HoleFeatures[_holeFeatureName];
// Set the hole feature tap info. _holeFeature.TapInfo = _holeTaperedThread; } catch (Exception _ex) { _app.UpdateLog(nameof(ThreadDesignation), _ex); }
0 Likes
274 Views
0 Replies
Replies (0)