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

Document '.............................' has a command in progress

3 REPLIES 3
Reply
Message 1 of 4
fishtoasty
376 Views, 3 Replies

Document '.............................' has a command in progress

Hi,

If i start my own custom command (Acad 2008) that requires the user to pick points in multiple viewports, after the command has finished processing i seem to get multiple printouts to the output window saying Document '{DRAWING NAME}' has a command in progress, Hit Enter To Cancel or [Retry]:

This seems to only happen when switching between different viewports making them active whilst a command is in progress.

I am drawing my own graphics to the viewports using WorldDraw/Viewport Draw for that entity, if that means anything for this problem to occur...

Why is this happening and does anyone know how it can be resolved?

Many Thanks
3 REPLIES 3
Message 2 of 4
fishtoasty
in reply to: fishtoasty

Oh another note is that i am using 'acedRegCmds->addCommand' to register my custom commands in conjunction with acedGetPoint(.......)

Thanks Edited by: fishtoasty on Mar 9, 2009 2:31 PM
Message 3 of 4
fishtoasty
in reply to: fishtoasty

During my command i am accessing an object via its objectId as follows:



lockActiveDocument(); //own function that locks the active document

es = acdbOpenObject(blah, blahId, AcDb::kForWrite);

unlockActiveDocument(); //own function that unlocks the active document




It seems unlocking the document causes this issue whilst my command is in progress.
Is it safe to lock the active document without the subsequent unlock? As this seems to resolve my problem.
Will my command that is just defined as being ACRX_CMD_TRANSPARENT be unlocking the document itself once it completes its operation?
Is there anyway i can detect whether a command is currently in progress??

Many Thanks
Message 4 of 4
fishtoasty
in reply to: fishtoasty

Quote taken from documentation seems to answer my question:

"Applications should normally never have to lock or unlock the current document. Commands registered with addCommand() or aceddefun() will have the current document locked before starting, and unlocked after ending"

Thanks

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

Post to forums  

Autodesk Design & Make Report

”Boost