Inventor crashing with new 3D Annotations in drawing

Inventor crashing with new 3D Annotations in drawing

DWhiteley
Advisor Advisor
575 Views
7 Replies
Message 1 of 8

Inventor crashing with new 3D Annotations in drawing

DWhiteley
Advisor
Advisor

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

0 Likes
576 Views
7 Replies
Replies (7)
Message 2 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

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,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 8

DWhiteley
Advisor
Advisor

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

0 Likes
Message 4 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

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,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 5 of 8

DWhiteley
Advisor
Advisor

Dim oRetDims As ObjectCollection

 

Model attached.

0 Likes
Message 6 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

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,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 7 of 8

DWhiteley
Advisor
Advisor
Ok, thanks Chandra. Is this likely to be fixed soon?



Dave







---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
0 Likes
Message 8 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

Hi Dave,

 

Yes, It will be fixed soon.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes