Quiescent state and Command Line

Quiescent state and Command Line

Anonymous
Not applicable
756 Views
2 Replies
Message 1 of 3

Quiescent state and Command Line

Anonymous
Not applicable

I am seeing a "document busy" message when using a custom command-line command.

 

The purpose of the command-line command is to check to see if a newer version of the currently opened drawing is available in other locations.

A check is made, and if a newer version of the document is available, the current document should close, the new version would be downloaded and would overwrite the older version, and the drawing would be reopened and made the active drawing.

 

It seems like as soon as the command is run the current drawing is marked as busy.  I can see that the drawing is marked as "not quiescent".  At that point, any attempt to close the drawing programmatically fails.  

 

I'm able to run this command successfully from an menu item.

Any suggestion for how to get around this?

0 Likes
Accepted solutions (1)
757 Views
2 Replies
Replies (2)
Message 2 of 3

Alexander.Rivilis
Mentor
Mentor
Accepted solution

You have to create your command with flag CommandFlags.Session:

[CommandMethod("MyTest", CommandFlags.Session)]
public void MyTestNet()
{
//...
}

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

0 Likes
Message 3 of 3

Anonymous
Not applicable

I need to test this more, but I think this will fix the problem.

What confuses me though is that the flag isQuiescent for the document is still set to false -- probably because my command-line command is running.

I had been looking at this flag previously to determine whether or not I could delete a document or not.

But in this case, even though the flag was set to false, I still seem to be able to delete it.

0 Likes