How can we switch between the start and document's tab in ACAD 2016

How can we switch between the start and document's tab in ACAD 2016

Anonymous
Not applicable
656 Views
4 Replies
Message 1 of 5

How can we switch between the start and document's tab in ACAD 2016

Anonymous
Not applicable

Hi,

 

I have start tab and a document tab,start tab is active and now I want to activate tab of the first document opened in  the AutoCAD.

I have tried using - iterate documents and active doc ,it does not work.

 

I tried using setcurrentdocument,it does not work.

 

 

Is there any api in the Object arx  of 2016 which I can use to activate the tab of document  or switch to the document tab from start tab?

 

Or move to document tab from the start tab?

 

Any help will be appreciated.

 

Thanks,

Vinod

0 Likes
657 Views
4 Replies
Replies (4)
Message 2 of 5

Alexander.Rivilis
Mentor
Mentor

IMHO AcApDocWindowManager and AcApDocWindow::activate can help you.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks for the reply ,yes  your reply can work but I wanted to switch the tab in application context.

 

Anyways I used activate document api toi switch the tab in document activated event.

 

Thanks,

Vinod

0 Likes
Message 4 of 5

tbrammer
Advisor
Advisor

I am using this code within a command function that is registered with ACRX_CMD_MODAL|ACRX_CMD_SESSION, so that it runs in application context:

 

AcApDocument *pDoc=<your document>;
acDocManager->activateDocument(pDoc);

Works just fine.

I think you rather have problems if you are not in application context because your current document will be locked than. In this case I use acDocManager->sendStringToExecute() to call my command.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes
Message 5 of 5

Anonymous
Not applicable

Hi,

 

I am so sorry replying so late for this post.

 

Thanks for the reply.

 

I tried with a command registered as ACRX_CMD_MODAL | ACRX_CMD_SESSION ,it activates the document but does not show document in the viewer.

It shows start tab page only.

 

Any suggestion or help will be appreciated.

 

Thanks,

Vinod

0 Likes