"Command in progress" after save as

"Command in progress" after save as

Anonymous
Not applicable
1,802 Views
3 Replies
Message 1 of 4

"Command in progress" after save as

Anonymous
Not applicable

Hi,

 

I am facing a problem during saving file in AutoCAD (2013 / 2014) using "Save As" menu.

 

Our software is AutoCAD based and we allow user to work with many drawings in single session.

If I change one drawing file and click "Save As" then it saves file with new name at different location.

However later when I try to perform some other action in same or different drawing, then getting following message -

                document "....dwg" has a command in progress.

                Hit enter to cancel or [Retry]

Hitting enter or retry does not help and I need to kill AutoCAD exe and then restart it for further work.

 

Such problem is not observed if I save the drawing, on save prompt while closing the drawing.

Also, this problem is observed when "FIBERWORLD" is "1" and not when it has value as "0".

 

Please reply -

If you resolved such issue by fixing code, if yes then how?

Or

If this is the problem from AutoCAD side.

 

Thanks a lot for your time.

 

With regards

ND

0 Likes
Accepted solutions (1)
1,803 Views
3 Replies
Replies (3)
Message 2 of 4

StephenPreston
Alumni
Alumni
Accepted solution

It sounds like you locked a document and didn't dispose of your documentlock when you'd finished.

Cheers,

Stephen Preston
Autodesk Developer Network
0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks for you hint...

 

In our code, "acDocManagerPtr()->lockDocument(..)" & "acDocManagerPtr()->unlockDocument(..);" is called in many methods.

Went through each sequence of lock & unlock call.

In 1 method, found that only "acDocManagerPtr()->lockDocument(..)" is called and respective "unlock" is not written there.

So updated code and added "acDocManagerPtr()->unlockDocument(..);" there.

 

This fix has resolved our problem.

 

Thanks again for your reply.

 

with regards

ND.

0 Likes
Message 4 of 4

Alexander.Rivilis
Mentor
Mentor

There is a class AcAxDocLock which can help you. Its constructor lock document and destructor unlock document.

 

For example:

{
  AcAxDocLock docLock;
  // Now current document is locked
  ...
}
// Now current document is unlocked

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