VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AEC win,door in ADT3.3

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
111 Views, 0 Replies

AEC win,door in ADT3.3

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
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost