ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 4
suparhigh12345
237 Views, 3 Replies

Hatch?

Is there a way to create a hatch similar to the hatch command, where the hatch is generated by hovering the mouse inside, for example, a rectangle? This requires determining boundaries to trigger the hatch. I believe using appendLoop alone may not achieve this??

3 REPLIES 3
Message 2 of 4

maybe acedTraceBoundary would help?

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
Message 3 of 4

I have tried, but I'm unsure how to implement that in Hatch. The output from TraceB is inconsistent, sometimes producing regions and other times curves.

Message 4 of 4

Are you sure acedTraceBoundary "sometimes producing regions..."? Here is what the documentation says:

normanyuan_0-1719146453472.png

 

Also, since you want to show possible areas while moving mouse, that means you just want to have a temporary visual hint of the areas. Thus, using Hatch entity is really not a good choice, because Hatch can only be created and evaluated after being added into database in order to be visually shown correctly in Editor. You only want to create the Hatch at the end when user makes up his/her mind settling the mouse move.

 

You may get some inspiration from the article in the link below, while the code in it is for AutoCAD .NET API, but you'll get the idea and could easily do the similar with unmanaged ObjectARX or managed ObjectARX C++ of your choice:

 

https://drive-cad-with-code.blogspot.com/2023/02/prompting-area-by-moving-mouse-cursor.html 

 

Norman Yuan

Drive CAD With Code

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report