Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

2019 API ClearanceHoleInfo Error in FastenerStandard

nathaniel_dickerson
Explorer
Explorer

2019 API ClearanceHoleInfo Error in FastenerStandard

nathaniel_dickerson
Explorer
Explorer

Is it possible to Get / Set the FastenerStandard with the 2019 API?

 

A test below still fails with a Part Document Active and two clearance holes.

 

Public Sub holeTest19()
Dim aDoc As PartDocument
Set aDoc = ThisApplication.ActiveDocument
Dim pFeat As PartFeature

For Each pFeat In aDoc.ComponentDefinition.Features
If TypeOf pFeat Is HoleFeature Then

Dim hFeature As HoleFeature
Set hFeature = pFeat
Dim cInfo As HoleClearanceInfo
Set cInfo = hFeature.ClearanceInfo

Debug.Print (pFeat.Name)
'Debug.Print (cInfo.FastenerStandard) '<<FAILS
Debug.Print (cInfo.FastenerSize)
Debug.Print (cInfo.FastenerType)
Debug.Print (cInfo.FastenerFitType)

End If
Next


End Sub

0 Likes
Reply
Accepted solutions (1)
602 Views
7 Replies
Replies (7)

chandra.shekar.g
Autodesk Support
Autodesk Support

@nathaniel_dickerson,

 

Can you please provide sample part which contains hole feature with FastnerStandard to test? Please make sure that file is non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes

nathaniel_dickerson
Explorer
Explorer

@chandra.shekar.g

 

Per your request, a file is attached. 

0 Likes

chandra.shekar.g
Autodesk Support
Autodesk Support

@nathaniel_dickerson,

 

For some reason, attachment is missing. Please reattach the part.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@nathaniel_dickerson,

 

Issue is reproducible while reading value FastenerStandard for hole feature. A change request is created with engineering team and change request is INVGEN -20431 - Unable to read value from HoleClearanceInfo.FastenerStandard API for a Hole Feature.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes

chandra.shekar.g
Autodesk Support
Autodesk Support

@nathaniel_dickerson ,

 

ClearanceHoleInfo API issue seems to be fixed in Inventor 2020. Can you please verify and confirm the same?

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes

Anonymous
Not applicable

Thank you for the information, sadly it does not. IV2020 crashes when I attempt to set a variable to the HoleFeature.ClearanceInfo. Code is below. The code will execute but IV2020 Crashes without any error handle.

 

WIN10 PRO ( 1809 ) , 64bit


Public Sub testCL()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument

' Create the new sketch block definition.
Dim pHF As HoleFeature
For Each pHF In oPartDoc.ComponentDefinition.Features.HoleFeatures
Debug.Print (pHF.Name)
'Tested Good Here
If pHF.IsClearanceHole = True Then
Debug.Print ("We Have a ClearanceHole")

'Build168,Release 2020-01/20/2019

'INVENTOR SOFTWARE VERSION: 50345728
Debug.Print ("INVENTOR SOFTWARE VERSION: " & ThisApplication.SoftwareVersion)
'TestFails Below
'Dim pCL As HoleClearanceInfo
'Set pCL = pHF.ClearanceInfo
'Debug.Print ("We have set ClearanceInfo")

End If
Next
End Sub

 

File is attached for testing. Please advise.

 

 

 

0 Likes

josh.nieman
Advocate
Advocate

@chandra.shekar.g Any update or acknowledgement of whether or not this HoleFeature API issue persists?

 

This function has been long awaited.

0 Likes