Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

LineType not used with 3Dpoly automation

Status
Not open for further replies.

CTruax

Civil/Environmental
Joined
May 21, 2001
Messages
82
Location
US
'In Acad v14 exists a layer with Linetype = Dashed
'That layer is the active layer
'From VB6 automation control I have;
'P(0 To 11) is an array of Doubles (4 points)
Dim tmpPolyLine
Set tmpPolyLine = moSpace.Add3dpoly(p)
'the polyline is drawn in the layers color but not dashed

tmpPolyLine.Color = acRed 'will change the color to red

'Why isn't the line dashed
 
'1. 3DPoly linetype optically appears continuous on screen even when property is dashed (Acad14)
' This is the same whether 3Dpoly is drawn manual or from VBA
' The idea is that when printed it would come dashed.
'3. AddLightWeightPolyline(points) needs two coords per point, but appears dashed on screen

Sub PolyOnDashedLayer()

'In Acad v14 exists a layer with Linetype = Dashed
'That layer is the active layer
'From VB6 automation control I have;
Dim VPoints As Variant
' Create the array of 5 points
VPoints = Array(0#, 0#, 0#, 10#, 10#, 10#, 30#, 20#, 30#, 50#)
' Move the points into an array of Doubles
ReDim points(UBound(VPoints)) As Double
For count = LBound(points) To UBound(points)
points(count) = VPoints(count)
Next count
' Creates a 3DPolyline in model space

Dim tmpPolyLine As Object
'Set tmpPolyLine = ThisDrawing.ModelSpace.Add3DPoly(points)
Set tmpPolyLine = ThisDrawing.ModelSpace.AddLightWeightPolyline(points)
'the polyline is drawn in the layers color but not dashed

tmpPolyLine.Color = acRed 'will change the color to red

'Why isn't the line dashed
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top