Hi All,
New to the Forum, Thanks for all your help
Could someone please help me get an AEC win,door,wall...Location in (x,y,z)
format? I tried adding the following ["Location: " & door.Location] to
Binrock's code below but I'm doing something wrong
I am trying to get the location, height, & width of all Aec windows and
doors in a given wall section and set each to a variable.
Thanks for your time.
Paul
Public Sub GetDoorWidth_n_Height()
' Declare all the variables
Dim newObj As AcadObject
Dim door As AecDoor
On Error Resume Next 'tmp dissable error handling to prevent crash if
nothing selected
ThisDrawing.Utility.GetEntity newObj, pickPt, "Select a Door" & vbCrLf
On Error GoTo 0 're-enable error handler
' Check if nothing selected
If newObj Is Nothing Then
ThisDrawing.Utility.Prompt "Nothing selected." & vbCrLf
Exit Sub
' Check if it's a door
ElseIf Not (TypeOf newObj Is AecDoor) Then
ThisDrawing.Utility.Prompt "This is not a Door." & vbCrLf
Exit Sub
Else
'Got a door
Set door = newObj
Set newObj = Nothing
MsgBox "Door Found!" & vbCrLf & _
"Width: " & door.Width & vbCrLf & _
"Height: " & door.Height
End If
End Sub