Make the dialog close programmatically, or set Autocad to never show pop-up.

Make the dialog close programmatically, or set Autocad to never show pop-up.

yakido
Explorer Explorer
901 Views
4 Replies
Message 1 of 5

Make the dialog close programmatically, or set Autocad to never show pop-up.

yakido
Explorer
Explorer

Hello.
I am writing a plugin that goes over a bunch of autocad dwg files, opens up each file one by one, and calculates something about the drawings in each file, and then saves the result to a file.
My problem is that some of the files cause a dialog box to open for various reasons, and expects the user to close the dialog box.
This makes the process get stuck, and holds the progress from continuing.

How do I either make the dialog close programmatically, or set Autocad to never show pop-up ?

An example of a pop-up (dialog box) is : "large number of scale..." or "previous version AEC object detected.." and actually there are so many of them, so "don't show again" doesn't work. Usually these popups are not important and I dismiss them but the plugin needs to go through many files without the user closing dialog boxes.

Thanks.

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

shaohuilv
Explorer
Explorer
AcDbDatabase::readDwgFile
0 Likes
Message 3 of 5

yakido
Explorer
Explorer

reading the DWG file isn't good enough because I am capturing a screenshot from AutoCAD and the DWG API gives you access to data but not the graphic representation of the data...
sorry if I haven't made it clear in my previous post..

0 Likes
Message 4 of 5

Alexander.Rivilis
Mentor
Mentor

You can use Windows hooks. Sample with .NET (C#): https://adndevblog.typepad.com/autocad/2015/04/dismissing-popup-dialogs-in-autocad.html 

The same can be doing with ObjectARX C++.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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 5 of 5

tbrammer
Advisor
Advisor

@yakido wrote:

reading the DWG file isn't good enough because I am capturing a screenshot from AutoCAD and the DWG API gives you access to data but not the graphic representation of the data...


Have you tried to use the ATIL API (<ARXSDK>\utils\Atil)?

It should be possible to render graphics from an AcDbDatabase that is not loaded in the editor to a file. This should be much faster and more flexible than capturing screenshots. For examples see

 

https://adndevblog.typepad.com/autocad/2013/01/capturing-a-screen-shot-using-objectarx.html?cid=6a01...

 

https://adndevblog.typepad.com/autocad/2015/03/creating-transparent-image-using-atil.html

 


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

0 Likes