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

AutoCAD 2015 – Document Reactor – documentActivated – Behavior is changed

3 REPLIES 3
Reply
Message 1 of 4
cadsindia
974 Views, 3 Replies

AutoCAD 2015 – Document Reactor – documentActivated – Behavior is changed

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.

3 REPLIES 3
Message 2 of 4
moogalm
in reply to: cadsindia

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

Message 3 of 4
cadsindia
in reply to: moogalm

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

  1. Activated: 'D:\Drawing1.dwg' document
  2. To Be Destroyed: 'D:\SaveAsDrawing.dwg' document
  3. Activated: 'D:\Drawing1.dwg' document

 

AutoCAD 2015:

The following messages will be displayed on executing the command

  1. Activated: 'D:\Drawing1.dwg' document
  2. To Be Destroyed: 'D:\SaveAsDrawing.dwg' document

It can be observed that the message "3. Activated: 'D:\Drawing1.dwg' document" is not getting displayed.

 

Please advise

Thanks.

Message 4 of 4
moogalm
in reply to: cadsindia

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.

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

Post to forums  

Autodesk Design & Make Report

”Boost