April 01, 2007

ADT 2006 & Prior - Angular Automatic Properties

Here is a heads up for anyone using ADT 2006 and prior and making use of any of the automatic property sources that report the measurement of an angle, such as the Included Angle of an Arc, the Rotation of a Block Reference or the Roll of a Structural Member. The angular value will be reported based on the current setting of the AUNITS System Variable, and for any setting other than 0 [decimal degrees], the value will have non-numeric formatting attached - a suffix of "r" for radians; a suffix of "g" for grads; "d", "'" and """ for degrees/minutes/seconds; and "d", "'" and """ plus "N" or "S" and "E" or "W" for surveyor. The precision of the number will be based on that of the AUPREC System Variable, not that of the Property Data Format assigned to the automatic property.

If you want to use the anglar value for mathematical calculations in a formula property, assuming that AUNITS is set to 0 and AUPREC is set to a sufficiently high value will cause problems if AUNITS is set to anything else and may cause problems with accuracy if AUPREC is set too low. Also keep in mind that the VBScript angle functions take angular input in radians, so even if you have decimal degrees with appropriate precision, you will need to convert the value to radians first. There does not appear to be a constant for the value of PI in VBScript, so you will need to type that into your formulas manually, with sufficient precision for the task at hand. 3.14159265358979323846264...

The good news is that in ADT 2007, the value of angular automatic property sources are reported in unformatted radians, using the real number precision set in the assigned Property Data Format. If you are migrating formulas from 2004-2006 to 2007 or later that use automatic angles, you will have to adjust them to the changed source value, but at least you will have a consistent value from which to start.

No comments: