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

Any restrictions inside "CommandEnded"?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
WolframKuss12
419 Views, 4 Replies

Any restrictions inside "CommandEnded"?

Not surprisingly, in many reactors, for example objectModified or pickfirstModified, you have to be careful what ObjectArx commands you use. Strategies are to just "log" things you need to do or use sendString to do them later.


Are there any similar restrictions in "CommandEnded", especially regarding using the Group Dict?

 

We sometimes get error logs from our customers with an error we can not reproduce. The critical code is called from commandended.

 

4 REPLIES 4
Message 2 of 5

Hi,

 

Though “CommandEnded” is relatively safe to update the database,it is recommended to use “sendstringtoexecute” from command end call back to perform database modifications. It is always "safe" to modify the database inside a “command”.



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

Message 3 of 5


@Virupaksha_aithal wrote:
Though “CommandEnded” is relatively safe to update the database,it is recommended to use “sendstringtoexecute” from command end call back to perform database modifications. It is always "safe" to modify the database inside a “command”.

"relatively safe" means: There are certain unsafe modifications in certain conditions that should be handled in a seperate command.

Can you give examples and explain why they are unsafe in "CommandEnded"?


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

Message 4 of 5

Hi,

 

I do not have any clear case where it fails – at present, having said this, doing any database modifications in a command is always recommended. So, if there is any opportunity to make the database modifications in a command, I would always do in a command – instead of reactor call back.



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

Message 5 of 5

Thank you for your openness and your time. I will rewrite my code to use sendStringToExecute().

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

Post to forums  

Autodesk Design & Make Report

”Boost