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

"AutoCAD Main Window Invisible" Error

1 REPLY 1
Reply
Message 1 of 2
Anonymous
609 Views, 1 Reply

"AutoCAD Main Window Invisible" Error

Hi All, While using the GetEntity utility I keep getting an error. "AutoCAD main window is invisible. To turn on the window, set the visible property of the application object to acTrue" Althought a few times it has worked, mostly just the error. Any thoughts on what I am doing wrong. Thank You, Paul Dim obj As AecEntity Dim pt As Variant Dim wall As AecWall ThisDrawing.Utility.GetEntity obj, pt, "Select a Wall: " If TypeOf obj Is AecWall Then Set wall = obj MsgBox "Wall Length: " & wall.length, vbInformation, "Length Example" Else MsgBox "Not a Wall", vbExclamation, "Length Example" End If
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Me.hide before GetEnt oops.. "Paul Richardson" wrote in message news:40a932ec_1@newsprd01... > Hi All, > > While using the GetEntity utility I keep getting an error. > > "AutoCAD main window is invisible. To turn on the window, set the visible > property of the application object to acTrue" > > Althought a few times it has worked, mostly just the error. Any thoughts on > what > I am doing wrong. > > Thank You, > > Paul > > Dim obj As AecEntity > Dim pt As Variant > Dim wall As AecWall > > ThisDrawing.Utility.GetEntity obj, pt, "Select a Wall: " > > If TypeOf obj Is AecWall Then > Set wall = obj > MsgBox "Wall Length: " & wall.length, vbInformation, "Length > Example" > Else > MsgBox "Not a Wall", vbExclamation, "Length Example" > End If > >

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

Post to forums  

Autodesk Design & Make Report

”Boost