Message 1 of 1
TaperedThreadInfo Throws an unspecified error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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); }