.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sent to front an open document

4 REPLIES 4
Reply
Message 1 of 5
rtejada
263 Views, 4 Replies

Sent to front an open document

Hi
I am opening a drawing using the application documents object open method and it opens sucessfully but, it is sent back of the current document windows. I then use the document object active method to bring it to front, but I discovered that by doing so, it interrupts the program execution unless I activate the window that I want to keep on the back. Is there a way to open a drawing, keep it to the front and continue the program execution?

I will appreciate any help
4 REPLIES 4
Message 2 of 5
jbulzomi
in reply to: rtejada

Im having the same problem...

Can someone please help.

this is how i am calling the file-open
Dim file As Document = Application.DocumentManager.Open(filename, False)

I then attempt to zoom in by calling
Application.DocumentManager.MdiActiveDocument.SendStringToExecute("_Zoom _E ", False, True, False

The file will load but behind the default drawing1.dwg document. I need it to load in the foreground and remain there.

Any help much appreciated...
Message 3 of 5
phoenixbs
in reply to: rtejada

Hi,

Did you ever find out how to do this, its been bugging me for days now.

Thanks
Message 4 of 5
mohnston
in reply to: rtejada

Have you tried setting MdiActiveDocument to the newly opened Document?
For example:
Dim file As Document = Application.DocumentManager.Open(filename, False)
Application.DocumentManager.MdiActiveDocument = file
CAD Programming Solutions
Message 5 of 5
Anonymous
in reply to: rtejada

Your code must be running in the application context
in order to switch active documents.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5683442@discussion.autodesk.com...
Hi,

Did you ever find out how to do this, its been bugging me for days now.

Thanks

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost