Hello sir,
We have a drawing file as current drawing. I tried to do a “Save As” of the current drawing using the following code:
acdbCurDwg()->saveAs(…)’
Then I tried to close the saved drawing using the following code:
‘acDocManagerPtr()->closeDocument(...)’
On closing the saved drawing the following reactor event has been triggered:
‘documentToBeDestroyed(…)’
After closing the saved document, the original drawing file, from which the drawing has been saved is getting activated.
But the ‘documentActivated(…)’ reactor event is not getting triggered.
The same sequence was working fine so far with previous AutoCAD versions up to 2014.
And this problem has occurred with 2015 alone.
A code sample to replicate the problem “ArxProject.zip” is attached along with this e-mail.
Please advise in this regard ASAP
Thanks.
Thanks for attaching the project, I might not have completely followed you hence didn’t reproduce the behaviour as you claim.
Can you please list out instruction steps to reproduce the behaviour.
Madhukar M
Thank you for your quick response
Please follow the steps below to reproduce the sequence:
1. Load the ARX file compiled from the attached project
2. Open an existing drawing say 'D:\drawing1.dwg'
3. Run the command named 'Test'
The command is behaving different in AutoCAD 2014 & AutoCAD 2015
AutoCAD 2014:
The following messages will be displayed on executing the command
AutoCAD 2015:
The following messages will be displayed on executing the command
It can be observed that the message "3. Activated: 'D:\Drawing1.dwg' document" is not getting displayed.
Please advise
Thanks.
When you open drawing1.dwg using API “acDocManager->appContextOpenDocument” activate event is triggered and drawing1 will activate, after closing the SaveAsDrawing document only documentToBeDestroyed event will trigger as the drawing1 document is already active so no activate event will trigger. I agree that this is not the behaviour with ACAD2014 but for ACAD2015 the said behaviour is expected.
If you let us know what the actual requirement that you need is or problem you’re experiencing so that we can find a solution.
Thanks ,
Madhukar.