Disable User Interface ACAD

Disable User Interface ACAD

aales
Participant Participant
825 Views
5 Replies
Message 1 of 6

Disable User Interface ACAD

aales
Participant
Participant

I want make impossible user iteraction with ACAD during my code is running. My application has one user form and manipulate with couple of dwg files. Modal form is a good idea, but brings other problems with opening files, manipulate plot preview etc. Modeless form works good, except user iteraction possibility with ACAD.

Is there any possibility to disable it?

Thanks for any idea.

0 Likes
826 Views
5 Replies
Replies (5)
Message 2 of 6

arcticad
Advisor
Advisor

http://forums.autodesk.com/t5/NET/ScreenUpdating/m-p/3074316#M24142

---------------------------



(defun botsbuildbots() (botsbuildbots))
0 Likes
Message 3 of 6

aales
Participant
Participant

Thanks for reply. I read topics in the link, but I'm afraid that it isn't exactly what I'm looking for. The problems in the link could be solved wrapping commands with a single transaction and then commiting it - if I understand well.

On the other hand I want disable ACAD's user interface (ribbons, menus, main edit window, command line, etc.) to prevent user interaction with main (ACAD) application and run commands, which could cause unexpected behavior in my application.

 

My question is:

Is it possible by coding in .NET invoke the same behavior of the main ACAD window in the same way as I display a modal form in front of it?

 

P.S.: Something like UserInterfaceManager.UserInteractionDisabled property in Inventor

0 Likes
Message 4 of 6

dgorsman
Consultant
Consultant

Not that I'm aware of.  It may be possible but likely requires some serious programmatic gymnastics.  It may be time to revisit your methodology to avoid the problem in the first place.  What is it you are trying to accomplish by locking out the user?

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 5 of 6

jeff
Collaborator
Collaborator

Seems like your executing code woulld hold up the UI anyways,

 

 

If you want the exact functionality as a modal form in AutoCAD have you tried adding a Windows Form and making it invisible then when your code is done close it.

 

You could probably create a interface that the Form implements or add a method that takes the Interface to work with your code.

You can also find your answers @ TheSwamp
0 Likes
Message 6 of 6

aales
Participant
Participant

Thanks for suggestions.

My application manipulates with files - Open, extract or write data to them and Close. And it was originally written in VBA. VBA and ACAD didn't have the problem with displaying a modal form and open dwg file behind the modal form, but in .NET it is impossible due to the ACAD application context and so on. In this case I need a modal form behavior without a modal form:) It would be the easiest way for me, that application could do the same with the minimal effort.

I don't want, that user could e.g. open another file when application is running and so on...

I have a list of files in ListView and go through it with For Each loop. In this loop I open, do something, close and take next. With modal form I have to close the modal form before opening file, but in this case the loop breaks and brings other problems too. So it would result in huge changes in hiearchy of coding.

0 Likes