API error when querying DrawingDimension.Text.Text

API error when querying DrawingDimension.Text.Text

Anonymous
Not applicable
525 Views
4 Replies
Message 1 of 5

API error when querying DrawingDimension.Text.Text

Anonymous
Not applicable

I have found an API error when attempting to query the text of a dimension that displays dual dimensions (Style: ‘Default – mm [in] (ANSI)’) and Deviation tolerancing.  Attempting to query DrawingDimension.Text.Text will cause an “unexpected error”.

 

So I attempted to query DrawingDimension.Text.FormattedText which equals “<DimensionValue/>”.  I checked the length of FormattedText and it’s 17 characters long.

 

This problem exists in both 2009 and 2011.

0 Likes
526 Views
4 Replies
Replies (4)
Message 2 of 5

YuhanZhang
Autodesk
Autodesk

This is a known issue for dual dimension. How would this impact you?



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 3 of 5

Anonymous
Not applicable

I'm using the OnChange event to add Attribute data to dimensions that have been overwritten (network login name, date, text before the change and the text after the change).  I do first test for HideValue = Ture and if ModelValue <> OverrideModelValue.

Ultimately this data is displayed to the user in a report.  They can either press an addin button to produce the report (Form) or configure the report to automatically open (in conjuction with the OnOpenDocument event) if there are any overwritten dimensions in the drawing being opened.

0 Likes
Message 4 of 5

YuhanZhang
Autodesk
Autodesk

I could not think out a good workaround for this. A possible way maybe that you can add a description in your report try to tell user which dimension(display OverrideModelValue maybe) was overridden.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thanks yuhanzhang.

 

We don't create too many of these type dimensions so I've decided to trap the error and exit the routine if DrawingDimension.Text.Text cannot be queried.  If Autodesk ever fixes this problem then my routine will be able to operate normally.

 

0 Likes