How to extend the functionality of an AutoCAD command

How to extend the functionality of an AutoCAD command

mecoman6GF27
Advocate Advocate
328 Views
1 Reply
Message 1 of 2

How to extend the functionality of an AutoCAD command

mecoman6GF27
Advocate
Advocate

Hi everyone.

As per the title of the post, I would like to ask you if it is possible to expand the functionality of a command already present in AutoCAD.

I give an example. Let's imagine we have two solids. The first solid (red solid) has a hole which is occupied by a second solid (yellow solid).

What I would like to do is this: when I select the second solid and press the "Del" key on the keyboard I would like the solid to be canceled and the hole on the first solid to disappear.

It's possible?

I report two images that refer to the example I made earlier.

Img1.png

Img2.png


Thanks a lot, bye.

0 Likes
329 Views
1 Reply
Reply (1)
Message 2 of 2

Ed__Jobe
Mentor
Mentor

Your question really involves two separate things.

1. Generally, you can't modify a command, but you can create macros that prefix or suffix functionality. To really extend a command, you need to duplicate what the original command does using an api and then add your own functionality.

 

2. Solid modeling doesn't work that way. You may be able to 'heal' a solid IF you have the history turned on. Then you can select subobjects and move, copy, rotate and erase them.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes