ACA: Wall Rotation Property

I came across a request today from someone who wanted to be able to set up a Display Theme based on the rotation of Walls, to graphically call out any that were close to, but not quite orthogonal. Rotation is not one of the automatic property sources for Walls, but it is a property of a Wall and that data can be extracted using a Formula property. The raw data is in radians, but you can apply the appropriate factor to covert that to degrees in the Formula property. Here are the formulas I created to make the Wall rotation value available as a property that could then be the basis of a Display Theme:

Radians

On Error Resume Next
Set acadApp = GetObject(,"AutoCAD.Application")
Set wallObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
RESULT = CDbl( wallObj.Rotation )

Degrees

On Error Resume Next
Set acadApp = GetObject(,"AutoCAD.Application")
Set wallObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
pi = 4 * Atn( 1.0 )
RESULT = CDbl( (wallObj.Rotation * 180.0) / pi)

In…
Read more