Jump to content

AR-CONC hatch problem


elhamyy

Recommended Posts

hi

i write this procedure to apply hatch to polyline area from vb6 but i see the hatch with some patterns only i mean when apply ANGLE pattern the hatch appear but with AR-CONC i do not see any hatch

any body can help me

 

the program

Dim acadapp As AcadApplication

Dim anobg As Object

On Error Resume Next

Set acadapp = GetObject(, "autocad.application")

If Err Then

Err.Clear

Set acadapp = CreateObject("autocad.application")

If Err Then

MsgBox Err.Description

Exit Sub

End If

End If

acadapp.Visible = True

Dim hatchObj As AcadHatch

Dim patternName As String

Dim PatternType As Long

Dim bAssociativity As Boolean

Dim outerLoop(0 To 0) As AcadEntity

patternName = "AR-CONC"

 

PatternType = 0

bAssociativity = True

ReDim points(0 To 11) As Double

points(0) = 0: points(1) = 50: points(2) = 0

points(3) = 0: points(4) = 52: points(5) = 0

points(6) = 53: points(7) = 52: points(8) = 0

' points(9) = 53: points(10) = 50: points(11) = 0

points(9) = 0: points(10) = 50: points(11) = 0

Set hatchObj = Acadapp.ActiveDocument.ModelSpace.AddHatch(PatternType, patternName, bAssociativity)

Set outerLoop(0) = Acadapp.ActiveDocument.ModelSpace.AddPolyline(points)

hatchObj.AppendOuterLoop (outerLoop)

hatchObj.HatchStyle = acHatchStyleIgnore

hatchObj.PatternScale = 0.25

hatchObj.Evaluate

Acadapp.ActiveDocument.Regen True

Link to comment
Share on other sites

Not sure about code but ar-conc and gravel suffer from a problem that the hatch origin point needs to be near the object being hatched we use survey MGA x.y are real big numbers so 0,0 default hatch origin gives us problems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...