×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

LineType not used with 3Dpoly automation

LineType not used with 3Dpoly automation

LineType not used with 3Dpoly automation

(OP)
'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

RE: LineType not used with 3Dpoly automation

'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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources