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

Knowing when a template is being saved instead of a drawing

1 REPLY 1
Reply
Message 1 of 2
dinomyar
360 Views, 1 Reply

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

Knowing when a template is being saved instead of a drawing

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.

Tags (2)
1 REPLY 1
Message 2 of 2
tbrammer
in reply to: dinomyar

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

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.

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report