AppendOuterloop

AppendOuterloop

Anonymous
Not applicable
264 Views
1 Reply
Message 1 of 2

AppendOuterloop

Anonymous
Not applicable
My AcadEntity is created in the drawing being "Item (4)" a Circle, when I
assign the circle to outerloop, I get an error when trying to
appendOuterloop. How can I hatch an object which is already created in
modelspace?

Dim hatchObj As AcadHatch
Dim patternName As String
Dim PatternType As Long
Dim bAssociativity As Boolean
Dim outerLoop(0 To 0) As AcadEntity

' Define the hatch
patternName = "ANSI31"
PatternType = 0
bAssociativity = True

Set outerLoop(0) = acadDoc.ModelSpace.Item(4)
Set hatchObj = acadDoc.ModelSpace.AddHatch(PatternType, patternName,
bAssociativity)

' Append the outer loop to the hatch object, and display the hatch
hatchObj.AppendOuterLoop (outerLoop)
hatchObj.Evaluate
0 Likes
265 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
What's the error message?
--
John Goodfellow
irtf'nm
use 'microtouch' in address to email

"William Garcia" wrote in message
news:90E332B040CEAADDAA69720C1FC6D5A5@in.WebX.SaUCah8kaAW...
> My AcadEntity is created in the drawing being "Item (4)" a Circle, when I
> assign the circle to outerloop, I get an error when trying to
> appendOuterloop. How can I hatch an object which is already created in
> modelspace?
>
> Dim hatchObj As AcadHatch
> Dim patternName As String
> Dim PatternType As Long
> Dim bAssociativity As Boolean
> Dim outerLoop(0 To 0) As AcadEntity
>
> ' Define the hatch
> patternName = "ANSI31"
> PatternType = 0
> bAssociativity = True
>
> Set outerLoop(0) = acadDoc.ModelSpace.Item(4)
> Set hatchObj = acadDoc.ModelSpace.AddHatch(PatternType, patternName,
> bAssociativity)
>
> ' Append the outer loop to the hatch object, and display the hatch
> hatchObj.AppendOuterLoop (outerLoop)
> hatchObj.Evaluate
>
0 Likes