Issues with 3D Hatch and Hatch Scale

Issues with 3D Hatch and Hatch Scale

Anonymous
Not applicable
404 Views
0 Replies
Message 1 of 1

Issues with 3D Hatch and Hatch Scale

Anonymous
Not applicable

Hello All:

 

I would like to hatch an area defined by a 3D polyline. When I use the method AddHatch, the hatch is displayed in 2D whereas the "varouter" is defined as a 3D polyline. Is there a function that enables drawing 3D hatch?

 

Finally, I have another question about hatching. I know which hatch scale I should use to have the result I expect but I don't manage to set the scale value in the code. This is why I do:

hatch.LinetypeScale = 1
ThisDrawing.SetVariable "DIMSCALE", 1
ThisDrawing.SetVariable "HPSCALE", 4000

Unfortunately, the hatch scale is never 4000 when I run the program.

 

Can anybody help me with these issues?

 

You can find a piece of my code below...

 

Thanks a lot in advance,

 

Dim polyline As Acad3DPolyline
Dim vertices(17) As Double

vertices(0) = pt1(0): vertices(1) = pt1(1): vertices(2) = pt1(2)
vertices(3) = pt3(0): vertices(4) = pt3(1): vertices(5) = pt3(2)
vertices(6) = pt5(0): vertices(7) = pt5(1): vertices(8) = pt5(2)
vertices(9) = pt6(0): vertices(10) = pt6(1): vertices(11) = pt6(2)
vertices(12) = pt4(0): vertices(13) = pt4(1): vertices(14) = pt4(2)
vertices(15) = pt2(0): vertices(16) = pt2(1): vertices(17) = pt2(2)

 

Set polyline = ThisDrawing.ModelSpace.Add3DPoly(vertices)

polyline.Type = acSimplePoly
polyline.Closed = True
polyline.Update

 

Dim hatch As AcadHatch
Dim varOuter(0) As AcadEntity
Set hatch = ThisDrawing.ModelSpace.AddHatch(acHatchPatternTypePreDefined, "ANSI31", True)
Set varOuter(0) = polyline
hatch.AppendOuterLoop varOuter
hatch.LinetypeScale = 1
ThisDrawing.SetVariable "DIMSCALE", 1
ThisDrawing.SetVariable "HPSCALE", 4000
hatch.Evaluate
hatch.Update

0 Likes
405 Views
0 Replies
Replies (0)