Autodesk ObjectARX
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
*Bliudzius, Mindaugas
Is realy object modified?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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
I need only thows objects
witch let say coordinates changed (not just was opened and closed). Any
idea?
How to chek is object modified, because objectModified() event occurs when
object was opened, but it may be still the same
witch let say coordinates changed (not just was opened and closed). Any
idea?
*Justavian
Re: Is realy object modified?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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.maYI adrTaRb...
> Hi,
>
> How to chek is object modified, because objectModified() event occurs when
> object was opened, but it may be still the same
I need only thows
objects
> witch let say coordinates changed (not just was opened and closed). Any
> idea?
>
>
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"
news:EAB401FFD30640080421860B21AEFE90@in.WebX.maYI
> Hi,
>
> How to chek is object modified, because objectModified() event occurs when
> object was opened, but it may be still the same
objects
> witch let say coordinates changed (not just was opened and closed). Any
> idea?
>
>
*Bliudzius, Mindaugas
Re:
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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
The main reason why your replay is good, that now i know that there is no
straight way to do that
It is good to know that when you doing something
that there is no easier way
And thank's one more time for your
suggestions. I'll try to use them.
"Justavian" wrote in message
news:081E897285A91F8550B2AE63777F1EE6@in.WebX.maYI adrTaRb...
> 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.maYI adrTaRb...
> > Hi,
> >
> > How to chek is object modified, because objectModified() event occurs
when
> > object was opened, but it may be still the same
I need only thows
> objects
> > witch let say coordinates changed (not just was opened and closed). Any
> > idea?
> >
> >
>
>
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
The main reason why your replay is good, that now i know that there is no
straight way to do that
that there is no easier way
suggestions. I'll try to use them.
"Justavian"
news:081E897285A91F8550B2AE63777F1EE6@in.WebX.maYI
> 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"
> news:EAB401FFD30640080421860B21AEFE90@in.WebX.maYI
> > Hi,
> >
> > How to chek is object modified, because objectModified() event occurs
when
> > object was opened, but it may be still the same
> objects
> > witch let say coordinates changed (not just was opened and closed). Any
> > idea?
> >
> >
>
>
*D'Arcy, Gary
Re:
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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.maYI adrTaRb...
> 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
> The main reason why your replay is good, that now i know that there is no
> straight way to do that
It is good to know that when you doing
something
> that there is no easier way
And thank's one more time for your
> suggestions. I'll try to use them.
>
>
> "Justavian" wrote in message
> news:081E897285A91F8550B2AE63777F1EE6@in.WebX.maYI adrTaRb...
> > 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.maYI adrTaRb...
> > > Hi,
> > >
> > > How to chek is object modified, because objectModified() event occurs
> when
> > > object was opened, but it may be still the same
I need only thows
> > objects
> > > witch let say coordinates changed (not just was opened and closed).
Any
> > > idea?
> > >
> > >
> >
> >
>
>
> 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"
news:2F10160818A1FEC46F7D72432162A33F@in.WebX.maYI
> 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
> The main reason why your replay is good, that now i know that there is no
> straight way to do that
something
> that there is no easier way
> suggestions. I'll try to use them.
>
>
> "Justavian"
> news:081E897285A91F8550B2AE63777F1EE6@in.WebX.maYI
> > 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"
> > news:EAB401FFD30640080421860B21AEFE90@in.WebX.maYI
> > > Hi,
> > >
> > > How to chek is object modified, because objectModified() event occurs
> when
> > > object was opened, but it may be still the same
> > objects
> > > witch let say coordinates changed (not just was opened and closed).
Any
> > > idea?
> > >
> > >
> >
> >
>
>

