AEC win,door in ADT3.3

Discussion in 'AutoCAD' started by Paul Richardson, May 15, 2004.

  1. 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
     
    Paul Richardson, May 15, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.