I have found that Inventor 2018 crashes when using GetRetrievableDimensions if the model document contains the new 3D Annotations:
Dim oDims As GeneralDimensions
oDims = osheet.DrawingDimensions.GeneralDimensions
For Each oView In oViews
oRetDims = oDims.GetRetrievableDimensions(oView)
(Works fine in 2017)
Dave Whiteley
Envisage UK Ltd
Hi Dave,
Please try the following sample code.
Dim oDims As GeneralDimensions oDims = oSheet.DrawingDimensions.GeneralDimensions For Each oView in oViews Dim objColl As ObjectCollection objColl = oDims.GetRetrievableDimensions(oView) Next
If still Inventor crashes, then please provide document which contains 3 D annotation.
Please feel free to contact if there is any doubt.
If solves your problem, click on "Accept as solution" / give a kudo.
Thanks and regards,
Hi Chandra,
I just took out the line oRetDims = oDims.GetRetrievableDimensions(oView)
This fixed my problem of Inventor 2018 crashing:
For Each oView In oViews
''oRetDims = oDims.GetRetrievableDimensions(oView)
''If oRetDims.Count > 0 Then
Try
Dim dimsEnum As GeneralDimensionsEnumerator
dimsEnum = oDims.Retrieve(oView)
Catch ex As Exception
End Try
Next
I still believe there is a problem with GetRetrievableDimensions with parts that have 3D annotation added to them.
Dave
Hi Dave,
Can you please specify about declaration of oRetDims variable?
Actually, GetRetrievableDimensions(oView) method returns ObjectCollection. So, oRetDims should be declared as ObjectCollection.
Please provide 3d annotation part file, if it is non confidential.
Thanks and regards,
Hi Dave,
I can also reproduce crash, if the model contains tolerance feature annotations.
So, I checked with engineering team. It is a known issue.
Thanks and regards,
Hi Dave,
Yes, It will be fixed soon.
Thanks and regards,