Knowing when a template is being saved instead of a drawing

Knowing when a template is being saved instead of a drawing

dinomyar
Enthusiast Enthusiast
457 Views
1 Reply
Message 1 of 2

Knowing when a template is being saved instead of a drawing

dinomyar
Enthusiast
Enthusiast

In my SSC_ArxApp class, during the On_kSaveMsg message handler, is there a way to tell if a template is being saved instead of a drawing? We have data that we save into the drawing, but do not want to save it in a template.

0 Likes
458 Views
1 Reply
Reply (1)
Message 2 of 2

tbrammer
Advisor
Advisor

I would recommend to handle drawing save events with a class derived from AcRxEventReactor:

class YourEventReactor: public AcRxEventReactor 
{
  public:
    void beginSave    (AcDbDatabase*, const ACHAR *pIntendedName) override {
        // your code
    }
    void saveComplete (AcDbDatabase*, const ACHAR *pActualName) override {
        // your code
    }
    void abortSave    (AcDbDatabase*) override {
        // your code
    }
};

 For a sample see <ARX>\samples\database\ARXDBG\

      Inc\ArxDbgEventReactor.h

      Reactors\ArxDbgEventReactor.cpp


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

0 Likes