Blessed3x,
I know Jeff has a very good station offset point & point group table program
he posted in the customer-files a while back. You could insert land points
on the polylines/line that create your striping and use this program to
create the station offset table by selection in each drawing or in a
schedule sheet.
For the quanties you might use a selection by layer & object that returns to
total distance. Not sure how that will work for your type of drawings.
You might creating a print text/csv file with the station, offset & maybe
the layer with the layers names right inside of Jeff's program. that could
help you calc the amount of sf of paint by layer item. like c-strp-36,
c-strp-24.
I looked at doing something like this for runway striping. first I used
alignment because I could get and label all the lengths & curve data from
the alignments.
It worked ok but I HAD a ton of alignments. Next I looked at selecting a
polyline and getting the station offset of the vertices points and curve
data, but I'm still having trouble with curve data from polylines.
this is all cut and paste stuff but it might help you get started. I'll look
at home for a working sample and e-mail or place in customer-files for you
if I can locate.
have a great day.
John Coon
load alignment
Public Sub CommandButton2_Click()
hide
Open "C:\temp\polystaoff.csv" For Output As 1# 'Open file for output
Dim STATION As String
Dim OFFSET As String
Dim ALIGNMENT As String
STATION = "STATION"
OFFSET = "OFFSET"
ALIGNMENT = "ALIGNMENT"
Print #1, STATION & "," & OFFSET & "," & ALIGNMENT 'Write right side
comma-delimited
Dim PLine As AcadLWPolyline
Set PLine = getPLine
If Not (PLine Is Nothing) Then
Dim Points As Variant
Points = PLine.Coordinates
LabelStations Points
Else
MsgBox "No polyline was selected.", vbInformation, "Finished"
End If
End Sub
Private Function getPLine() As AcadLWPolyline
On Error Resume Next
Dim Pick As AcadEntity, PickPt As Variant
ThisDrawing.Utility.GetEntity Pick, PickPt, _
vbCrLf & "Select polyline: "
If Not (Pick Is Nothing) Then
If TypeOf Pick Is AcadLWPolyline Then Set getPLine = Pick
End If
End Function
Private Sub LabelStations(Points As Variant)
Dim dbPref As AeccDatabasePreferences
Set dbPref = AeccApplication.ActiveDocument.Preferences
Dim mtxtLabel As AcadMText
Dim dblRot As Double
Dim x As Double
Dim y As Double
Dim InsertionPnt(0 To 2) As Double
Dim StationText As String
Dim objaligns As AeccAlignments
Dim varDataPnt As Variant
varDataPnt = InsertionPnt
Dim objAlign As AeccAlignment
Dim dblSta As Double
Dim dblOff As Double
Dim dblDir As Double
Dim dblEast As Double
Dim dblNorth As Double
Set objAlign = proj.Alignments.Item(proj.Alignments.currentAlignment)
Dim TextColl As AcadTextStyles
Set TextColl = ThisDrawing.TextStyles
Dim strText As String
Dim dblHeight As Double
Dim dblWidth As Double
Dim blnReturn As Boolean
Dim strStaFormat As String
Dim strOffFormat As String
Dim strSta As String
Dim strOff As String
Dim StationFormat As String
StationFormat = "#0.00"
Dim i As Long
For i = 0 To (UBound(Points) - 1) Step 2
x = Points(i): y = Points(i + 1)
InsertionPnt(0) = x: InsertionPnt(1) = y: InsertionPnt(2) = 0
StationText = Format(CStr(x), StationFormat) & _
"," & Format(CStr(y), StationFormat)
dblRot = -ThisDrawing.GetVariable("VIEWTWIST")
objAlign.StationOffset InsertionPnt(0), InsertionPnt(1), dblSta, dblOff,
dblDir
dblHeight = dbPref.DatabaseScale * 0.12
strStaFormat = "#0.00"
strOffFormat = "#0.00"
strSta = Left(Format(dblSta, strStaFormat), Len(Format(dblSta,
strStaFormat)) - 5) _
& "+" & Right(Format(dblSta, strStaFormat), 5)
If dblOff > 0 Then
strOff = Format(dblOff, strOffFormat) & "' RT"
Else
strOff = Right(Format(dblOff, strOffFormat), (Len(Format(dblOff,
strOffFormat)) - 1)) _
& "' LT"
End If
strText = "STA: " & (strSta) & "\P" _
& "OFF: " & (strOff) & "\P" _
Dim currLayer As AcadLayer
Dim layerObj As AcadLayer
Set layerObj = ThisDrawing.Layers.Add("C-GEOM-TEXT")
layerObj.Color = acYellow
ThisDrawing.ActiveLayer = layerObj
Set mtxtLabel = ThisDrawing.ModelSpace.AddMText(InsertionPnt, dblRot,
strText)
mtxtLabel.Height = dblHeight
mtxtLabel.Rotation = dblRot
Print #1, strSta & "," & strOff & "," & objAlign.Name 'Write
Next i
Update
MsgBox "Polyline Station Offset Excel file saved to:
C:\temp\polystaoff.csv.", vbInformation, "Excel Station Offset File saved"
Show
End Sub
"Blessed3x" wrote in message
news:24095320.1100183811013.JavaMail.jive@jiveforum1.autodesk.com...
> I don't really have anything I could post, but I could tell you exactly
what I want done.
>
> I want to be able to automatically create a quantity table for pavement
marking quantities on road design sheets. I want each line listed by
beginning and ending station/offset and length. I figure tag labels could
be used for pmark types. For years we've just chugged along and done it all
by hand, but I have a couple of VERY large jobs that I would appreciate a
faster method. This seems like something that LDD should do. It could also
be used for storm and sanitary sewer, street lighting and any number of
other civil applications.
>
> Thanks.