Hatch area

Hatch area

Anonymous
Not applicable
276 Views
3 Replies
Message 1 of 4

Hatch area

Anonymous
Not applicable
Hi;

How do I calculate the height, width and area of a hatch?
Is it possible at all?


--
David
Strängbetong, Sweden
0 Likes
277 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I have tried something similar with no luck. If you find a way let me know.

"David" wrote in message
news:8732D4B26A0C5EAA6DEC572E0F1559C5@in.WebX.maYIadrTaRb...
> Hi;
>
> How do I calculate the height, width and area of a hatch?
> Is it possible at all?
>
>
> --
> David
> Strängbetong, Sweden
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
There's almost nothing impossible you know.

Sub CalcullateHatchThings()
Dim Ent As AcadEntity
Dim Pt As Variant

Dim PtMin, PtMax

ThisDrawing.Utility.GetEntity Ent, Pt, "Sélect one hatch"

Ent.GetBoundingBox PtMin, PtMax

'Area
MsgBox Ent.Area & " Units Square"

'Height
MsgBox PtMax(1) - PtMin(1) & " Units for Height"

'Width
MsgBox PtMax(0) - PtMin(0) & " Units for Width"

End Sub
0 Likes
Message 4 of 4

Anonymous
Not applicable
LOL... lets discard that last answer, since it is only valid if the hatch is a rectangle.

Here is a posibility (that I did not try, but it sould work):

Hatch boundaries work pretty mutch the same way that a region boundary work. So if you could extract the boundaries of a hatch, (GetLoopAt), then use the given entities to create a Region, you will then be able to use the Area property te get the area of the original hatch.

Problem is, this only works on associative hatches..... but it should work.
0 Likes