delete objects by pressing delete key

delete objects by pressing delete key

Anonymous
Not applicable
805 Views
6 Replies
Message 1 of 7

delete objects by pressing delete key

Anonymous
Not applicable

Hi! Is it possible to set some other sub or functions (for example delete from db or delete from Dictionary) when i press delete key on selected object on drawing? I need to delete object besides drawing, from database/dictionary by pressing delete key. Any suggestions?

0 Likes
806 Views
6 Replies
Replies (6)
Message 2 of 7

_gile
Consultant
Consultant

Hi,

 

Could you clarify the link between the selected entities and the non graphical objects as database (?] or dictionary.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 7

ActivistInvestor
Mentor
Mentor

@Anonymouswrote:

Hi! Is it possible to set some other sub or functions (for example delete from db or delete from Dictionary) when i press delete key on selected object on drawing? I need to delete object besides drawing, from database/dictionary by pressing delete key. Any suggestions?


You need to think about what you're trying to achieve, and first consider that there are many ways to delete an object, aside from pressing the delete key. You can right-click and choose Erase, or use a button on the ribbon/toolbar or a menu item.

 

What you're trying to achieve requires you to be notified when  one or more objects are erased, not when the user presses the delete key.

 

You can use the Database's ObjectErased event for that.

0 Likes
Message 4 of 7

Anonymous
Not applicable

I draw some objects such as circle, line, arc whatever then I assing for every object (key, value(Entity_Id in my case)) in Dictionary and write properties of the object to Access database with this Entity_id. Literally I have the same Ent_id in dictionary and Access database. When I select any object  I can remove property values of objects from Database and Dictionary, but I cant erase them from drawing immediately. I just want than when I pressed delete key -remove all of it: selected object on drawing, values in database and dictionary.

0 Likes
Message 5 of 7

Anonymous
Not applicable

I just wanna erase selected object from drawing and from database/dictionary using vb.net or c#.net

0 Likes
Message 6 of 7

ActivistInvestor
Mentor
Mentor

Sorry, just not sure what you mean by 'Dictionary'.

 


@Anonymouswrote:

I just wanna erase selected object from drawing and from database/dictionary using vb.net or c#.net


 

 

0 Likes
Message 7 of 7

BKSpurgeon
Collaborator
Collaborator

hi there - further to the questions my estimable colleagues have asked - would you be able to elaborate on the context in which information from the autocad database is replicated in the access database?

 

 

0 Likes