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??
maybe acedTraceBoundary would help?
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.
Are you sure acedTraceBoundary "sometimes producing regions..."? Here is what the documentation says:
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
Can't find what you're looking for? Ask the community or share your knowledge.