Which property of DBObject can determine that the entity has been modified?

Which property of DBObject can determine that the entity has been modified?

1039574776
Enthusiast Enthusiast
487 Views
3 Replies
Message 1 of 4

Which property of DBObject can determine that the entity has been modified?

1039574776
Enthusiast
Enthusiast

Which property of DBObject or Entity can determine that the entity has been modified. For example, if I modify entity A, after saving it, I will judge whether entity A has been modified. It is also possible that there are other entities in the drawing, only other entities are modified, entity A is not modified, and then the drawing is saved. At this time, I use the program to judge whether entity A has been modified. If it is not modified, it will not operate. If there is modification, the required code will be executed.thanks in advance.

@_gile

0 Likes
488 Views
3 Replies
Replies (3)
Message 2 of 4

norman.yuan
Mentor
Mentor

In general, you can either handle DBObject.Modified or Database.ObjectModified event, with latter being used more commonly.

 

You can also use ObjectOverrule to even watch particular property changes of a DBObject/Entity. One of my articles would give some idea on this:

https://drive-cad-with-code.blogspot.com/2020/05/prevent-certain-properties-of-entity.html 

 

However, I'd not make things too complicated if simply watching Database.ObjectModified event does the work.

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 4

1039574776
Enthusiast
Enthusiast

First of all thanks norman.yuan. It should be pointed out that I am drawing the reference file as the base map, and I do not have the authority to modify the base map. When an entity in the reference file is modified, I use a command in my own drawing to check whether there is any modification in the reference file, and if there is a modification, modify the corresponding part in my drawing accordingly. So I need to find that flag that records itself as being modified so I can do my job. Thanks again to everyone who could reply.

0 Likes
Message 4 of 4

1039574776
Enthusiast
Enthusiast
First of all thanks norman.yuan. It should be pointed out that I am drawing the reference file as the base map, and I do not have the authority to modify the base map. When an entity in the reference file is modified, I use a command in my own drawing to check whether there is any modification in the reference file, and if there is a modification, modify the corresponding part in my drawing accordingly. So I need to find that flag that records itself as being modified so I can do my job. Thanks again to everyone who could reply.
0 Likes