• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk ObjectARX

    Reply
    *Bliudzius, Mindaugas

    Is realy object modified?

    42 Views, 3 Replies
    02-20-2003 05:19 PM
    Hi,

    How to chek is object modified, because objectModified() event occurs when
    object was opened, but it may be still the same :smileysad: I need only thows objects
    witch let say coordinates changed (not just was opened and closed). Any
    idea?
    Please use plain text.
    *Justavian

    Re: Is realy object modified?

    02-22-2003 01:27 AM in reply to: *Bliudzius, Mindaugas
    As far as i know, there's no way to directly find out if an object was
    ACTUALLY modified. I've been struggling with this fact for a long time. In
    my particular case, however, all i need to know is whether the object has
    been moved or not. For that i store a point in my custom object -
    m_pntLastPosition. Everytime the objectModified( ) function gets fired, i
    check that variable. If my NEW point doesn't match the LAST one, then i
    know the object has been moved. What's the specific property that you need
    to be aware of?

    Another possible solution that i considered was to override the functions in
    my custom object that correspond to the properties i'm concerned about.
    What i mean by that is that if i need to know if an object gets moved, i can
    override the TransfromBy() function, and toggle a m_bWasModified boolean.
    Then, when objectModified gets called, i can identify that some sort of
    significant change was made.



    "Mindaugas Bliudzius" wrote in message
    news:EAB401FFD30640080421860B21AEFE90@in.WebX.maYIadrTaRb...
    > Hi,
    >
    > How to chek is object modified, because objectModified() event occurs when
    > object was opened, but it may be still the same :smileysad: I need only thows
    objects
    > witch let say coordinates changed (not just was opened and closed). Any
    > idea?
    >
    >
    Please use plain text.
    *Bliudzius, Mindaugas

    Re:

    02-22-2003 05:19 PM in reply to: *Bliudzius, Mindaugas
    Hi, thank's for reply,

    The problem is that i need to retriangulate surface when point was modified
    or deleted. It take a bit of time so i don't want regenerate surface if
    someone just opened and closed that point. At first i removed kForWrite
    (because this call event) from my program where i'm cheking objects and only
    if i realy need to change objetc i used upgeradeOpen(). But still some other
    program can do that :smileysad:
    The main reason why your replay is good, that now i know that there is no
    straight way to do that :smileyhappy: It is good to know that when you doing something
    that there is no easier way :smileyhappy: And thank's one more time for your
    suggestions. I'll try to use them.


    "Justavian" wrote in message
    news:081E897285A91F8550B2AE63777F1EE6@in.WebX.maYIadrTaRb...
    > As far as i know, there's no way to directly find out if an object was
    > ACTUALLY modified. I've been struggling with this fact for a long time.
    In
    > my particular case, however, all i need to know is whether the object has
    > been moved or not. For that i store a point in my custom object -
    > m_pntLastPosition. Everytime the objectModified( ) function gets fired, i
    > check that variable. If my NEW point doesn't match the LAST one, then i
    > know the object has been moved. What's the specific property that you
    need
    > to be aware of?
    >
    > Another possible solution that i considered was to override the functions
    in
    > my custom object that correspond to the properties i'm concerned about.
    > What i mean by that is that if i need to know if an object gets moved, i
    can
    > override the TransfromBy() function, and toggle a m_bWasModified boolean.
    > Then, when objectModified gets called, i can identify that some sort of
    > significant change was made.
    >
    >
    >
    > "Mindaugas Bliudzius" wrote in message
    > news:EAB401FFD30640080421860B21AEFE90@in.WebX.maYIadrTaRb...
    > > Hi,
    > >
    > > How to chek is object modified, because objectModified() event occurs
    when
    > > object was opened, but it may be still the same :smileysad: I need only thows
    > objects
    > > witch let say coordinates changed (not just was opened and closed). Any
    > > idea?
    > >
    > >
    >
    >
    Please use plain text.
    *D'Arcy, Gary

    Re:

    02-22-2003 10:25 PM in reply to: *Bliudzius, Mindaugas
    Mindaugas,

    > The problem is that i need to retriangulate surface when point was
    modified
    > or deleted. It take a bit of time so i don't want regenerate surface if


    Don't forget the undo function!

    You might want to investigate overriding the AcDbDatabaseReactor reactor;

    class dBaseReactor : public AcDbDatabaseReactor
    {
    public:
    virtual void objectUnAppended(const AcDbDatabase* dwg, const
    AcDbObject* dbObj);
    virtual void objectAppended(const AcDbDatabase *pDwg, const
    AcDbObject *pDbObj);
    virtual void objectModified(const AcDbDatabase *pDwg, const
    AcDbObject *pDbObj);
    virtual void objectErased(const AcDbDatabase *pDwg, const
    AcDbObject *pDbObj, Adesk::Boolean erased);
    virtual void objectOpenedForModify(const AcDbDatabase* dwg, const
    AcDbObject* dbObj);
    };

    and check in theses functions for your object!


    Regards Gary
    www.drcauto.com




    "Mindaugas Bliudzius" wrote in message
    news:2F10160818A1FEC46F7D72432162A33F@in.WebX.maYIadrTaRb...
    > Hi, thank's for reply,
    >
    > The problem is that i need to retriangulate surface when point was
    modified
    > or deleted. It take a bit of time so i don't want regenerate surface if
    > someone just opened and closed that point. At first i removed kForWrite
    > (because this call event) from my program where i'm cheking objects and
    only
    > if i realy need to change objetc i used upgeradeOpen(). But still some
    other
    > program can do that :smileysad:
    > The main reason why your replay is good, that now i know that there is no
    > straight way to do that :smileyhappy: It is good to know that when you doing
    something
    > that there is no easier way :smileyhappy: And thank's one more time for your
    > suggestions. I'll try to use them.
    >
    >
    > "Justavian" wrote in message
    > news:081E897285A91F8550B2AE63777F1EE6@in.WebX.maYIadrTaRb...
    > > As far as i know, there's no way to directly find out if an object was
    > > ACTUALLY modified. I've been struggling with this fact for a long time.
    > In
    > > my particular case, however, all i need to know is whether the object
    has
    > > been moved or not. For that i store a point in my custom object -
    > > m_pntLastPosition. Everytime the objectModified( ) function gets fired,
    i
    > > check that variable. If my NEW point doesn't match the LAST one, then i
    > > know the object has been moved. What's the specific property that you
    > need
    > > to be aware of?
    > >
    > > Another possible solution that i considered was to override the
    functions
    > in
    > > my custom object that correspond to the properties i'm concerned about.
    > > What i mean by that is that if i need to know if an object gets moved, i
    > can
    > > override the TransfromBy() function, and toggle a m_bWasModified
    boolean.
    > > Then, when objectModified gets called, i can identify that some sort of
    > > significant change was made.
    > >
    > >
    > >
    > > "Mindaugas Bliudzius" wrote in message
    > > news:EAB401FFD30640080421860B21AEFE90@in.WebX.maYIadrTaRb...
    > > > Hi,
    > > >
    > > > How to chek is object modified, because objectModified() event occurs
    > when
    > > > object was opened, but it may be still the same :smileysad: I need only thows
    > > objects
    > > > witch let say coordinates changed (not just was opened and closed).
    Any
    > > > idea?
    > > >
    > > >
    > >
    > >
    >
    >
    Please use plain text.