Jig causes entities disappear

Jig causes entities disappear

yysy112
Participant Participant
1,083 Views
4 Replies
Message 1 of 5

Jig causes entities disappear

yysy112
Participant
Participant

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.

0 Likes
Accepted solutions (1)
1,084 Views
4 Replies
Replies (4)
Message 2 of 5

daniel_cadext
Advisor
Advisor

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
0 Likes
Message 3 of 5

yysy112
Participant
Participant

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.

0 Likes
Message 4 of 5

tbrammer
Advisor
Advisor
Accepted solution

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.

0 Likes
Message 5 of 5

yysy112
Participant
Participant

Thanks for your reply. 

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

0 Likes