add arc to polyline array help

add arc to polyline array help

Anonymous
Not applicable
1,556 Views
8 Replies
Message 1 of 9

add arc to polyline array help

Anonymous
Not applicable
I'm looking for help / sample of how to add an arc to an existing polyline
array. My sample draws a polyline rectangle with an arc drawn from its end
points.

I'm trying to find a way to include the arc as part of the polyline array.
I've looked at the set buldge section but I don't understand how to include
the code to build the polyline along with the straight line segments. It
appeared that I could include a segment to close the polyline then go back
and change the buldge setting for that segment to build the poly array but
I'm not sure I'm interrupting that correctly. I placed a sample drawing in
the customer-files called "pline-test" under post called "polyline vba array
test"



any direction is appreciated,

John Coon


Sub addBulge()
Dim newpt502(2) As Double
newpt502(0) = 1850#: newpt502(1) = 0#: newpt502(2) = 0#
Dim newpt503(2) As Double
newpt503(0) = 1850#: newpt503(1) = 400#: newpt503(2) = 0#
Dim newpt505(2) As Double
newpt505(0) = 0#: newpt505(1) = 0#: newpt505(2) = 0#
Dim newpt506(2) As Double
newpt506(0) = 0#: newpt506(1) = 400#: newpt506(2) = 0#
Dim newpt507(2) As Double
newpt507(0) = 2250: newpt507(1) = 200#: newpt507(2) = 0#

Dim RPt1 As Variant
Dim RPt2 As Variant
Dim RPt3 As Variant
'creates arc from 3 points - written by Josh West
Dim PP1, PP2, PP3, PP4, PP5, CentrPt, CheckPt
Dim Chord1 As AcadLine
Dim Chord2 As AcadLine
Dim Vector1 As AcadXline
Dim Vector2 As AcadXline
Dim StartLin As AcadLine
Dim EndLin As AcadLine
Dim CheckLin As AcadLine
Dim MainArc As AcadArc
Dim AlternateArc As AcadArc
RPt1 = newpt502
RPt2 = newpt507
RPt3 = newpt503
Set Chord1 = ThisDrawing.ModelSpace.AddLine(RPt1, RPt2)
Set Chord2 = ThisDrawing.ModelSpace.AddLine(RPt2, RPt3)
PP1 = ThisDrawing.Utility.PolarPoint(RPt1, Chord1.angle, Chord1.Length / 2)
PP2 = ThisDrawing.Utility.PolarPoint(RPt2, Chord2.angle, Chord2.Length / 2)
PP3 = ThisDrawing.Utility.PolarPoint(PP1, Chord1.angle + ((3.141592654 * 90)
/ 180), 1#)
PP4 = ThisDrawing.Utility.PolarPoint(PP2, Chord2.angle + ((3.141592654 * 90)
/ 180), 1#)
Set Vector1 = ThisDrawing.ModelSpace.AddXline(PP1, PP3)
Set Vector2 = ThisDrawing.ModelSpace.AddXline(PP2, PP4)
CentrPt = Vector1.IntersectWith(Vector2, acExtendNone)
Set StartLin = ThisDrawing.ModelSpace.AddLine(CentrPt, RPt1)
Set EndLin = ThisDrawing.ModelSpace.AddLine(CentrPt, RPt3)
Set CheckLin = ThisDrawing.ModelSpace.AddLine(CentrPt, RPt2)
Set MainArc = ThisDrawing.ModelSpace.AddArc(CentrPt, StartLin.Length,
StartLin.angle, EndLin.angle)
CheckPt = CheckLin.IntersectWith(MainArc, acExtendNone)
On Error Resume Next
If CheckPt(0) = 0 Then CheckPt(0) = 0
If Err Then
Err.Clear
MainArc.Delete
Set AlternateArc = ThisDrawing.ModelSpace.AddArc(CentrPt,
StartLin.Length, EndLin.angle, StartLin.angle)
End If
Chord1.Delete
Chord2.Delete
Vector1.Delete
Vector2.Delete
StartLin.Delete
EndLin.Delete
CheckLin.Delete

Dim DRWPOLYAPPR1 As AcadLWPolyline
Dim approachpoints1(9) As Double
approachpoints1(0) = newpt502(0): approachpoints1(1) = newpt502(1)
approachpoints1(2) = newpt505(0): approachpoints1(3) = newpt505(1)
approachpoints1(4) = newpt506(0): approachpoints1(5) = newpt506(1)
approachpoints1(6) = newpt503(0): approachpoints1(7) = newpt503(1)
approachpoints1(8) = newpt503(0): approachpoints1(9) = newpt503(1)

Set DRWPOLYAPPR1 =
ThisDrawing.ModelSpace.AddLightWeightPolyline(approachpoints1)

End Sub
0 Likes
1,557 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
Just use Bulge property. When drawing a rectangle with arcs you must insert 1 more vertex:

This code draws a section pipe simbol:

Public Sub simbolo_vista_frontal_tubo( _
pcentro() As Double, _
ByVal diametro As Double, _
ByVal nome_hachura As String, _
Optional ByVal escala_hachura As Double = 1, _
Optional ByVal angulo_hachura As Double = 1, _
Optional ByVal nome_layer As String = vbNullString, _
Optional ByVal cor As ACAD_COLOR = acByLayer)

Dim objhatch As AcadHatch
Dim objpoly As AcadLWPolyline
Dim p1(x To Z) As Double
Dim p2(x To Z) As Double

Call delta(pcentro, p1, , 0.5 * diametro)
Call delta(pcentro, p2, , -0.5 * diametro)
Set objpoly = desenha_LWPolyline_pt_C(False, nome_layer, cor, vbNullString, 1, pcentro, p1, p2, pcentro)
Call objpoly.SetBulge(0, -1)
Call objpoly.SetBulge(1, -1)
Call objpoly.SetBulge(2, 1)
Set objhatch = desenha_hachura_objeto(objpoly, predefinida, nome_hachura, angulo_hachura, escala_hachura, , True, nome_layer, cor)
End Sub

Leonardo Roncetti
0 Likes
Message 3 of 9

Anonymous
Not applicable
With help from this discussion group I was able to put together my first routine which drew a curly brace by picking two points. Below is an excerpt of the code that shows the use of bulge.

' set variables for all start and end points
p2 = .PolarPoint(varStart, ang45p, flt_rds)
mp1 = .PolarPoint(p2, dblAng, (h_dst - (1.5 * flt_rds)))
mp = .PolarPoint(mp1, ang45p, flt_rds)
mp2 = .PolarPoint(mp, ang45n, flt_rds)
p3a = .PolarPoint(mp2, dblAng, (h_dst - (1.5 * flt_rds)))

' set vertice points
ReDim dblVertices(13)
dblVertices(0) = varStart(0): dblVertices(1) = varStart(1)
dblVertices(2) = p2(0): dblVertices(3) = p2(1)
dblVertices(4) = mp1(0): dblVertices(5) = mp1(1)
dblVertices(6) = mp(0): dblVertices(7) = mp(1)
dblVertices(8) = mp2(0): dblVertices(9) = mp2(1)
dblVertices(10) = p3a(0): dblVertices(11) = p3a(1)
dblVertices(12) = varEnd(0): dblVertices(13) = varEnd(1)

Set objEnt = ThisDrawing.ModelSpace.AddLightWeightPolyline(dblVertices)

objEnt.SetBulge 0, (1.5 * flt_rds)
objEnt.SetBulge 2, (-1.5 * flt_rds)
objEnt.SetBulge 3, (-1.5 * flt_rds)
objEnt.SetBulge 5, (1.5 * flt_rds)
objEnt.Update


Hope that helps you a little.

Scott
0 Likes
Message 4 of 9

Anonymous
Not applicable
Hi John,

The bulge is independent of the polyline array.

You have to compute and apply the bulge to each side where you want an arc
in the polyline.

This also means you have to compute the coordiantes of the ends of the arc
and add them to the polyline array so that you have a side which you can
transform to the arc with the SetBulge command.

This method of drawing polylines and the method of computing the bulge to
ensure tangency with the lines at each end could only have been devised by a
guy under the influence of Picasso, but we are stuck with it

It would be nice if Autodesk would add to the API

Polyline (Vertice).SetFillet = Radius

if you get what I mean

Note that in Civil 3D the API for drawing Alignments has this form of
functionality in very general terms (there are numerous invocations of this
process with a variety on parameters) invoked as:

Alignment.AddArc (Component(x), Component(y), Radius) where components x
and y are elements which have already been added to the alignment. The
programmer needs to keep track of what x and y are as they add them to the
alignment. One of the joys of that API is that if the initial objects are
lines only need by computed
from a pass through point and direction. Their intersection point is not
needed by the API, although in many cases it is convenient to compute it.

If you have Civil 3D (and the users of your code have it) then you may find
it easier to program to create an alignment, then explode it back to a
polyline.
--

Laurie Comerford
CADApps
www.cadapps.com.au
"John Coon" wrote in message
news:5230081@discussion.autodesk.com...
I'm looking for help / sample of how to add an arc to an existing polyline
array. My sample draws a polyline rectangle with an arc drawn from its end
points.

I'm trying to find a way to include the arc as part of the polyline array.
I've looked at the set buldge section but I don't understand how to include
the code to build the polyline along with the straight line segments. It
appeared that I could include a segment to close the polyline then go back
and change the buldge setting for that segment to build the poly array but
I'm not sure I'm interrupting that correctly. I placed a sample drawing in
the customer-files called "pline-test" under post called "polyline vba array
test"



any direction is appreciated,

John Coon


0 Likes
Message 5 of 9

Anonymous
Not applicable
Guys thank you so much for the responses.

I'll try to apply to my sample.

Laurie, the sample set buldge in the help see below, Is this what you were
talking about when you said I had to apply to each side where I want an arc.
If I'm understanding you correctly if I add a bulge with no curve and close
my polyline from newpt502 and newpt503 and then set a bulge that is equal to
the radius I need then update the polyine that will update the segment
between newpt502 and newpt503 to be a curve. Is that coorect?

John Coon
Sub Example_SetBulge()
' This example creates a light weight polyline in model space.
' It then finds and changes the bulge for a given segment.

Dim plineObj As AcadLWPolyline
Dim points(0 To 11) As Double

' Define the 2D polyline points
points(0) = 1: points(1) = 1
points(2) = 1: points(3) = 2
points(4) = 2: points(5) = 2
points(6) = 3: points(7) = 2
points(8) = 4: points(9) = 4
points(10) = 4: points(11) = 1

' Create a light weight Polyline object in model space
Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
ZoomAll

' Find the bulge of the 3rd segment
Dim currentBulge As Double
currentBulge = plineObj.GetBulge(3)
MsgBox "The bulge for the third segment is " & plineObj.GetBulge(3), ,
"SetBulge Example"

' Change the bulge of the 3rd segment
plineObj.SetBulge 3, -0.5
plineObj.Update
MsgBox "The bulge for the third segment is now " & plineObj.GetBulge(3),
, "SetBulge Example"

End Sub







"Laurie Comerford" wrote in message
news:5230756@discussion.autodesk.com...
Hi John,

The bulge is independent of the polyline array.

You have to compute and apply the bulge to each side where you want an arc
in the polyline.

This also means you have to compute the coordiantes of the ends of the arc
and add them to the polyline array so that you have a side which you can
transform to the arc with the SetBulge command.

This method of drawing polylines and the method of computing the bulge to
ensure tangency with the lines at each end could only have been devised by a
guy under the influence of Picasso, but we are stuck with it

It would be nice if Autodesk would add to the API

Polyline (Vertice).SetFillet = Radius

if you get what I mean

Note that in Civil 3D the API for drawing Alignments has this form of
functionality in very general terms (there are numerous invocations of this
process with a variety on parameters) invoked as:

Alignment.AddArc (Component(x), Component(y), Radius) where components x
and y are elements which have already been added to the alignment. The
programmer needs to keep track of what x and y are as they add them to the
alignment. One of the joys of that API is that if the initial objects are
lines only need by computed
from a pass through point and direction. Their intersection point is not
needed by the API, although in many cases it is convenient to compute it.

If you have Civil 3D (and the users of your code have it) then you may find
it easier to program to create an alignment, then explode it back to a
polyline.
--

Laurie Comerford
CADApps
www.cadapps.com.au
"John Coon" wrote in message
news:5230081@discussion.autodesk.com...
I'm looking for help / sample of how to add an arc to an existing polyline
array. My sample draws a polyline rectangle with an arc drawn from its end
points.

I'm trying to find a way to include the arc as part of the polyline array.
I've looked at the set buldge section but I don't understand how to include
the code to build the polyline along with the straight line segments. It
appeared that I could include a segment to close the polyline then go back
and change the buldge setting for that segment to build the poly array but
I'm not sure I'm interrupting that correctly. I placed a sample drawing in
the customer-files called "pline-test" under post called "polyline vba array
test"



any direction is appreciated,

John Coon


0 Likes
Message 6 of 9

Anonymous
Not applicable
Hi John,

Zoom center to 0,0 scale 20 and step through the code below.

Sub Bulgedemonstration()
Dim y As AcadLWPolyline
Dim Pt(0 To 5) As Double
Dim x As Double
Dim Bored As String
Const Enough = "This will loop till you stop it"
Pt(0) = 0
Pt(1) = 0
Pt(2) = 10
Pt(3) = 0
Pt(4) = 10
Pt(5) = 10

Set y = ThisDrawing.ModelSpace.AddLightWeightPolyline(Pt)

Do Until Bored = Enough
y.SetBulge 0, -x
y.SetBulge 1, x
' y.SetWidth 0, x / 4, x / 4 ' Add some variety by uncommenting this
' y.SetWidth 1, x / 10, x / 10
y.Update
x = x + 0.05

If x > 100 Then Exit Do ' Emergency exit

Loop

End Sub

Interestingly, if you run it till it exits, then zoom the the extent of the
finished polyline, the run it, it makes an ainmation of sorts.

--

Laurie Comerford
CADApps
www.cadapps.com.au
"John Coon" wrote in message
news:5230781@discussion.autodesk.com...
Guys thank you so much for the responses.

I'll try to apply to my sample.

Laurie, the sample set buldge in the help see below, Is this what you were
talking about when you said I had to apply to each side where I want an arc.
If I'm understanding you correctly if I add a bulge with no curve and close
my polyline from newpt502 and newpt503 and then set a bulge that is equal to
the radius I need then update the polyine that will update the segment
between newpt502 and newpt503 to be a curve. Is that coorect?

John Coon
Sub Example_SetBulge()
' This example creates a light weight polyline in model space.
' It then finds and changes the bulge for a given segment.

Dim plineObj As AcadLWPolyline
Dim points(0 To 11) As Double

' Define the 2D polyline points
points(0) = 1: points(1) = 1
points(2) = 1: points(3) = 2
points(4) = 2: points(5) = 2
points(6) = 3: points(7) = 2
points(8) = 4: points(9) = 4
points(10) = 4: points(11) = 1

' Create a light weight Polyline object in model space
Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
ZoomAll

' Find the bulge of the 3rd segment
Dim currentBulge As Double
currentBulge = plineObj.GetBulge(3)
MsgBox "The bulge for the third segment is " & plineObj.GetBulge(3), ,
"SetBulge Example"

' Change the bulge of the 3rd segment
plineObj.SetBulge 3, -0.5
plineObj.Update
MsgBox "The bulge for the third segment is now " & plineObj.GetBulge(3),
, "SetBulge Example"

End Sub







"Laurie Comerford" wrote in message
news:5230756@discussion.autodesk.com...
Hi John,

The bulge is independent of the polyline array.

You have to compute and apply the bulge to each side where you want an arc
in the polyline.

This also means you have to compute the coordiantes of the ends of the arc
and add them to the polyline array so that you have a side which you can
transform to the arc with the SetBulge command.

This method of drawing polylines and the method of computing the bulge to
ensure tangency with the lines at each end could only have been devised by a
guy under the influence of Picasso, but we are stuck with it

It would be nice if Autodesk would add to the API

Polyline (Vertice).SetFillet = Radius

if you get what I mean

Note that in Civil 3D the API for drawing Alignments has this form of
functionality in very general terms (there are numerous invocations of this
process with a variety on parameters) invoked as:

Alignment.AddArc (Component(x), Component(y), Radius) where components x
and y are elements which have already been added to the alignment. The
programmer needs to keep track of what x and y are as they add them to the
alignment. One of the joys of that API is that if the initial objects are
lines only need by computed
from a pass through point and direction. Their intersection point is not
needed by the API, although in many cases it is convenient to compute it.

If you have Civil 3D (and the users of your code have it) then you may find
it easier to program to create an alignment, then explode it back to a
polyline.
--

Laurie Comerford
CADApps
www.cadapps.com.au
"John Coon" wrote in message
news:5230081@discussion.autodesk.com...
I'm looking for help / sample of how to add an arc to an existing polyline
array. My sample draws a polyline rectangle with an arc drawn from its end
points.

I'm trying to find a way to include the arc as part of the polyline array.
I've looked at the set buldge section but I don't understand how to include
the code to build the polyline along with the straight line segments. It
appeared that I could include a segment to close the polyline then go back
and change the buldge setting for that segment to build the poly array but
I'm not sure I'm interrupting that correctly. I placed a sample drawing in
the customer-files called "pline-test" under post called "polyline vba array
test"



any direction is appreciated,

John Coon


0 Likes
Message 7 of 9

Anonymous
Not applicable
Laurie,

Fantastic! With your help and sample I was able to understand what I was
doing wrong. for those who are interested this sample changes a straight
segment to
include a bulge.
one interesting thing that I'm looking into is that if you apply a
acHatchPattern to the described new polyline array with the bugle set the
hatch does not
include hatch in the area of the bugle. the hatch inverses between the start
and end points that describe the bulge area and does not include hatch
beyond that.

Thanks you for all your help.
John Coon

Sub addBulge()
Dim newpt502(2) As Double
newpt502(0) = 1850#: newpt502(1) = 0#: newpt502(2) = 0#
Dim newpt503(2) As Double
newpt503(0) = 1850#: newpt503(1) = 400#: newpt503(2) = 0#
Dim newpt505(2) As Double
newpt505(0) = 0#: newpt505(1) = 0#: newpt505(2) = 0#
Dim newpt506(2) As Double
newpt506(0) = 0#: newpt506(1) = 400#: newpt506(2) = 0#
Dim newpt507(2) As Double
newpt507(0) = 2250: newpt507(1) = 200#: newpt507(2) = 0#
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim currentBulge As Double
Dim DRWPOLYAPPR1 As AcadLWPolyline
Dim approachpoints1(9) As Double
approachpoints1(0) = newpt502(0): approachpoints1(1) = newpt502(1)
approachpoints1(2) = newpt505(0): approachpoints1(3) = newpt505(1)
approachpoints1(4) = newpt506(0): approachpoints1(5) = newpt506(1)
approachpoints1(6) = newpt503(0): approachpoints1(7) = newpt503(1)
approachpoints1(8) = newpt502(0): approachpoints1(9) = newpt502(1)
Set DRWPOLYAPPR1 =
ThisDrawing.ModelSpace.AddLightWeightPolyline(approachpoints1)

currentBulge = DRWPOLYAPPR1.GetBulge(3)
MsgBox "The bulge segment is " & DRWPOLYAPPR1.GetBulge(3), , "SetBulge
Example"

DRWPOLYAPPR1.SetBulge 3, -1.99999841 ' clockwise for 253-44-23 angle
DRWPOLYAPPR1.Update
MsgBox "The bulge for the third segment is now " & DRWPOLYAPPR1.GetBulge(3),
, "SetBulge Example"
End Sub

'hatch sample
Set objlayer = ThisDrawing.Layers.Add("C-LOCZ-PATT")
objlayer.Color = acRed
ThisDrawing.ActiveLayer = objlayer
Dim objPline As AcadLWPolyline
Dim outerLoop(0 To 0) As AcadEntity
Dim objHatch As AcadHatch
Set objPline =
ThisDrawing.ModelSpace.AddLightWeightPolyline(approachpoints1)
objPline.Closed = True
Set objHatch = ThisDrawing.ModelSpace.AddHatch(acHatchPatternTypePreDefined,
"ansi31", True)
objHatch.PatternScale = 100
Set outerLoop(0) = objPline
objHatch.AppendOuterLoop outerLoop
objHatch.Evaluate
objPline.Delete
Update




"Laurie Comerford" wrote in message
news:5230814@discussion.autodesk.com...
Hi John,

Zoom center to 0,0 scale 20 and step through the code below.

Sub Bulgedemonstration()
Dim y As AcadLWPolyline
Dim Pt(0 To 5) As Double
Dim x As Double
Dim Bored As String
Const Enough = "This will loop till you stop it"
Pt(0) = 0
Pt(1) = 0
Pt(2) = 10
Pt(3) = 0
Pt(4) = 10
Pt(5) = 10

Set y = ThisDrawing.ModelSpace.AddLightWeightPolyline(Pt)

Do Until Bored = Enough
y.SetBulge 0, -x
y.SetBulge 1, x
' y.SetWidth 0, x / 4, x / 4 ' Add some variety by uncommenting this
' y.SetWidth 1, x / 10, x / 10
y.Update
x = x + 0.05

If x > 100 Then Exit Do ' Emergency exit

Loop

End Sub

Interestingly, if you run it till it exits, then zoom the the extent of the
finished polyline, the run it, it makes an ainmation of sorts.

--

Laurie Comerford
CADApps
www.cadapps.com.au
"John Coon" wrote in message
news:5230781@discussion.autodesk.com...
Guys thank you so much for the responses.

I'll try to apply to my sample.

Laurie, the sample set buldge in the help see below, Is this what you were
talking about when you said I had to apply to each side where I want an arc.
If I'm understanding you correctly if I add a bulge with no curve and close
my polyline from newpt502 and newpt503 and then set a bulge that is equal to
the radius I need then update the polyine that will update the segment
between newpt502 and newpt503 to be a curve. Is that coorect?

John Coon
Sub Example_SetBulge()
' This example creates a light weight polyline in model space.
' It then finds and changes the bulge for a given segment.

Dim plineObj As AcadLWPolyline
Dim points(0 To 11) As Double

' Define the 2D polyline points
points(0) = 1: points(1) = 1
points(2) = 1: points(3) = 2
points(4) = 2: points(5) = 2
points(6) = 3: points(7) = 2
points(8) = 4: points(9) = 4
points(10) = 4: points(11) = 1

' Create a light weight Polyline object in model space
Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
ZoomAll

' Find the bulge of the 3rd segment
Dim currentBulge As Double
currentBulge = plineObj.GetBulge(3)
MsgBox "The bulge for the third segment is " & plineObj.GetBulge(3), ,
"SetBulge Example"

' Change the bulge of the 3rd segment
plineObj.SetBulge 3, -0.5
plineObj.Update
MsgBox "The bulge for the third segment is now " & plineObj.GetBulge(3),
, "SetBulge Example"

End Sub







"Laurie Comerford" wrote in message
news:5230756@discussion.autodesk.com...
Hi John,

The bulge is independent of the polyline array.

You have to compute and apply the bulge to each side where you want an arc
in the polyline.

This also means you have to compute the coordiantes of the ends of the arc
and add them to the polyline array so that you have a side which you can
transform to the arc with the SetBulge command.

This method of drawing polylines and the method of computing the bulge to
ensure tangency with the lines at each end could only have been devised by a
guy under the influence of Picasso, but we are stuck with it

It would be nice if Autodesk would add to the API

Polyline (Vertice).SetFillet = Radius

if you get what I mean

Note that in Civil 3D the API for drawing Alignments has this form of
functionality in very general terms (there are numerous invocations of this
process with a variety on parameters) invoked as:

Alignment.AddArc (Component(x), Component(y), Radius) where components x
and y are elements which have already been added to the alignment. The
programmer needs to keep track of what x and y are as they add them to the
alignment. One of the joys of that API is that if the initial objects are
lines only need by computed
from a pass through point and direction. Their intersection point is not
needed by the API, although in many cases it is convenient to compute it.

If you have Civil 3D (and the users of your code have it) then you may find
it easier to program to create an alignment, then explode it back to a
polyline.
--

Laurie Comerford
CADApps
www.cadapps.com.au
"John Coon" wrote in message
news:5230081@discussion.autodesk.com...
I'm looking for help / sample of how to add an arc to an existing polyline
array. My sample draws a polyline rectangle with an arc drawn from its end
points.

I'm trying to find a way to include the arc as part of the polyline array.
I've looked at the set buldge section but I don't understand how to include
the code to build the polyline along with the straight line segments. It
appeared that I could include a segment to close the polyline then go back
and change the buldge setting for that segment to build the poly array but
I'm not sure I'm interrupting that correctly. I placed a sample drawing in
the customer-files called "pline-test" under post called "polyline vba array
test"



any direction is appreciated,

John Coon


0 Likes
Message 8 of 9

Anonymous
Not applicable
John,
In your example code you create 2 polylines, 1 with a bulge (DRWPOLYAPPR1)
and 1 without (objPline). It is the one without that you use for the hatch
so this is why the curved area does not get included in the hatch......

"John Coon" wrote in message
news:5230977@discussion.autodesk.com...
Laurie,

Fantastic! With your help and sample I was able to understand what I was
doing wrong. for those who are interested this sample changes a straight
segment to
include a bulge.
one interesting thing that I'm looking into is that if you apply a
acHatchPattern to the described new polyline array with the bugle set the
hatch does not
include hatch in the area of the bugle. the hatch inverses between the start
and end points that describe the bulge area and does not include hatch
beyond that.

Thanks you for all your help.
John Coon
0 Likes
Message 9 of 9

Anonymous
Not applicable
Jeff,

Thanks, Yes 6 months ago you helped with me with a polyline hatching
routine and you asked the question why I was deleting or using a different
pline for the hatch and I said it was because I was placing different
elements on different layer. well I got caught with it this time, great
catch. I looked at this for about two hours right under my nose and didn't
even see it. I was searching the help, ng.....for something about bugle &
hatch when it was once again a bonehead miss on my part.

I am getting better slowly thanks to all the help I receive from people in
the group which I am always grateful.

Have a great day
John Coon


"Jeff Mishler" wrote in message
news:5230994@discussion.autodesk.com...
John,
In your example code you create 2 polylines, 1 with a bulge (DRWPOLYAPPR1)
and 1 without (objPline). It is the one without that you use for the hatch
so this is why the curved area does not get included in the hatch......

"John Coon" wrote in message
news:5230977@discussion.autodesk.com...
Laurie,

Fantastic! With your help and sample I was able to understand what I was
doing wrong. for those who are interested this sample changes a straight
segment to
include a bulge.
one interesting thing that I'm looking into is that if you apply a
acHatchPattern to the described new polyline array with the bugle set the
hatch does not
include hatch in the area of the bugle. the hatch inverses between the start
and end points that describe the bulge area and does not include hatch
beyond that.

Thanks you for all your help.
John Coon
0 Likes