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

anyone could give me an example of multi viewport?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
421232206
692 Views, 5 Replies

anyone could give me an example of multi viewport?

Hi,  I searched the samples in the arx sdk, and found little about operating multi viewports with arx.  

you can see the picture below, I opened two dwgs in two windows, (I can't open two different dwgs in two viewports?), I want to operate on one dwg, and the second can reflect the change by code.

Technology change world! Coding change technology! We coders are coding!
5 REPLIES 5
Message 2 of 6
owenwengerd
in reply to: 421232206

I think synchronizing two different drawings will be quite challenging. What exactly is your question about "multi viewport"? It should be obvious that you need a separate document for separate drawings.

--
Owen Wengerd
ManuSoft
Message 3 of 6
421232206
in reply to: owenwengerd

sorry for delay, One of my project need to synchronize two different drawings, and I found little to help in sdk, so could provide some example? 

I have two dwgs, I want to do like this:  select one entity in the first dwg, and thround command or menu, the second dwg can zoom to some extend.  the two dwgs contain some common infomation for synchronizing.

 

 

Technology change world! Coding change technology! We coders are coding!
Message 4 of 6
owenwengerd
in reply to: 421232206

Sorry, I don't know of any samples specifically for synchronizing views. I have seen many posts about zooming to specific coordinates. I don't have any links handy, but I'm sure you can find such samples on your own. Once you have code for zooming to coordinates, you can create a command in the target document that does the zooming, then use e.g. AcApDocManager::sendStringToExecute() to start that command in the target document. It may be possible to perform the zooming without using a command, but I think using the command processor will be the simplest way.

--
Owen Wengerd
ManuSoft
Message 5 of 6
Balaji_Ram
in reply to: 421232206

There is no direct API to keep the model space viewports in sync. You will need to monitor the view changes and apply the view parameters to the other viewport. Also, it gets more challenging depending on the viewport size.

 

Here is a blog post that I created assuming you have only two model space viewports that are of equal width and vertical split. Hope this provides some ideas for your own implementation.

 

http://adndevblog.typepad.com/autocad/2014/07/synchronizing-model-space-viewports.html

 

Regards,

Balaji

 

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 6 of 6
421232206
in reply to: Balaji_Ram

thanks a lot, I will study the blog, and I believe it will give some idea. so, thank you again for your reply.
Technology change world! Coding change technology! We coders are coding!

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

Post to forums  

Autodesk Design & Make Report

”Boost