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

Jig causes entities disappear

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
yysy112
404 Views, 4 Replies

Jig causes entities disappear

Hi all,

 

During my jig process, if I keep zooming the screen until the "regen" process is called, all of the entities disappear.

 

1. It seems built-in jig will prevent the "regen" to be triggered. You can't zoom when a regen limit is hit. How to do that? any examples?

2. Is there any way to regen and show during jig process?

 

many thanks.

4 REPLIES 4
Message 2 of 5
daniel_cadext
in reply to: yysy112

If I zoom way out in a drawing, begin drawing a line, then start zooming in, eventually I see a message on the status bar saying

“Cannot zoom in further while a command is active”

I also found this:

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/AutoCAD-Zoom-only-...

 

 

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
Message 3 of 5
yysy112
in reply to: daniel_cadext

hi daniel,

 

Thanks for your reply. I tried to do my jig process in a command, it just works as you said.

But if my jig process is called by a modeless dialog, the "zooming scale limit" does't work then.

In my case, I have a modeless dialog. I hit a button, a circle is created and the jig process starts.

Message 4 of 5
tbrammer
in reply to: yysy112

A modeless dialog runs in "session context" and not in document context. This affects the behaviour of AutoCADs graphic system.  Also modeless dialog boxes must handle the WM_ACAD_KEEPFOCUS message as explained here to keep the focus. I suppose that you must avoid to keep the focus while the jig is running. 

 

The cleanest solution is to register a modal command that executes your jig and start it with AcApDocManager::sendStringToExecute() as explained here. Hide and/or "deactivate" your dialog while the command runs and re-activate it when it ends.

 

Also use

AcAxDocLock lock;
// your jig here...

to lock the current document before you start the jig. Maybe this already helps.


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

Message 5 of 5
yysy112
in reply to: tbrammer

Thanks for your reply. 

AcApDocManager::sendStringToExecute() seems to be the only way to solve my problem.

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report