.NET

Reply
Valued Contributor
rtejada
Posts: 61
Registered: ‎06-19-2002
Message 1 of 5 (73 Views)

Sent to front an open document

73 Views, 4 Replies
12-02-2005 05:15 AM
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
Active Member
jbulzomi
Posts: 8
Registered: ‎07-20-2005
Message 2 of 5 (72 Views)

Re: Sent to front an open document

05-10-2006 07:04 PM 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...
New Member
phoenixbs
Posts: 2
Registered: ‎08-08-2007
Message 3 of 5 (72 Views)

Re: Sent to front an open document

08-08-2007 07:57 AM in reply to: rtejada
Hi,

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

Thanks
Distinguished Contributor
mohnston
Posts: 184
Registered: ‎09-22-2006
Message 4 of 5 (73 Views)

Re: Sent to front an open document

08-10-2007 08:33 AM 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
*Tony Tanzillo
Message 5 of 5 (73 Views)

Re: Sent to front an open document

08-10-2007 12:50 PM 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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.