Getting point collection of the AREA command

Getting point collection of the AREA command

josip_skopljak
Contributor Contributor
600 Views
4 Replies
Message 1 of 5

Getting point collection of the AREA command

josip_skopljak
Contributor
Contributor

Hi,

 

I have been trying for a while to copy the AREA command functionality. I want it to work the same way , the only difference being in that i want to keep the object when i click enter. Is there a way to edit a command in Autocad using .net  or an event that could get raised when a point is clicked. I have already tried implementing a Hatch Jig which does work but it flickers a lot and it is not quite the same experience as the AREA command. Any help would be appreciated.

 

Thank you in advance

0 Likes
Accepted solutions (1)
601 Views
4 Replies
Replies (4)
Message 2 of 5

norman.yuan
Mentor
Mentor
Accepted solution

I am not sure I understand what you really want, or what issue you have, but assume that you probably want to right code so that when it runs in the similar visual way the command "AREA" does, and you would end up with a collection of points where user clicked.

 

I posted a few articles in my blog on mimicking "Area" command and thought they may be of help:

 

https://drive-cad-with-code.blogspot.com/2011/01/mimicking-autocads-area-command-with.html

https://drive-cad-with-code.blogspot.com/2011/01/mimicking-autocads-area-command-with_20.html

https://drive-cad-with-code.blogspot.com/2011/01/mimicking-autocads-area-command-with_21.html

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 5

josip_skopljak
Contributor
Contributor

As far as I can see , this code is absolutely meeting my needs. The only difference i really want is to keep the hatch and polyline that the AREA command generates for further usage.  I ll mark your answer as the solution.

 

Thank you very much.

0 Likes
Message 4 of 5

ActivistInvestor
Mentor
Mentor

@josip_skopljak wrote:

The only difference i really want is to keep the hatch and polyline that the AREA command generates for further usage.  


 

 

You can use an ObjectOverrule to capture temporary objects that are created by the hatch command.

 

 

0 Likes
Message 5 of 5

josip_skopljak
Contributor
Contributor

Can you show me an example how i would get the created object of the area command? 

After a further look at the code i got in the answer it does not behave as smoothly as the area command and i would prefer another solution where i could record the points selected during the command or as suggested retrieve the object that the area command generates and then disappears

 

 

0 Likes