Message 1 of 3
capture radius in ent with other entities in selection.

Not applicable
05-28-2005
08:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Looking for help with a selection set.
What I'm trying to do is get all lines, arcs & lwpolylines on layers curb
and 0. so that I can get the xy location of the end points of all these
items and pass them to
query the station & offset to a Land alignment. I'm able to get all items on
the named layers but I'm having trouble with the varDataPnt.
I used the varDataPnt = ent.EndPoint but this skips the start point of arcs.
What can I use to get both the start & endpoint of all items.
Also I create the SS with layer curb & 0 but in the If.ent.layer test I
don't see how to inclues addtional layers without adding another line and
place the addtional layer names in it. can you add a array of layers to the
ent.layer test with type of ent.
As always thanks you for any comments
John Coon
Set ss = ThisDrawing.SelectionSets.Add("ss")
fType(0) = 8: fData(0) = "CURB, 0"
fType(1) = 0: fData(1) = "LINE,ARC,AcadLWPolyline"
ss.Select acSelectionSetAll, , , fType, fData
For Each ent In ThisDrawing.ModelSpace
If TypeOf ent Is AcadArc Then
dblRadius = ent.RADIUS
End If
If ent.Layer = "CURB" And (TypeOf ent Is AcadArc Or TypeOf ent Is
AcadLine Or TypeOf ent Is AcadLWPolyline) Then
count = count + 1
Dim varDataPnt As Variant
varDataPnt = ent.EndPoint
'''''''''''''''''''''''''''''''''''''''''''''''more stuff....load land
alingment for station offset values
Set mtxtLabel = ThisDrawing.ModelSpace.AddMText(varDataPnt, dblWidth,
stastrlen)
mtxtLabel.Height = dblHeight
mtxtLabel.Rotation = dblRot
If TypeOf ent Is AcadArc Then
Set mtxtLabel = ThisDrawing.ModelSpace.AddMText(varDataPnt, dblWidth,
strradius)
mtxtLabel.Height = dblHeight
mtxtLabel.Rotation = dblRot
End If
End If
Print #1, strSta & "," & strOff & "," & dblRadius & "," & STRY & "," & STRX
& "," & dblDir
What I'm trying to do is get all lines, arcs & lwpolylines on layers curb
and 0. so that I can get the xy location of the end points of all these
items and pass them to
query the station & offset to a Land alignment. I'm able to get all items on
the named layers but I'm having trouble with the varDataPnt.
I used the varDataPnt = ent.EndPoint but this skips the start point of arcs.
What can I use to get both the start & endpoint of all items.
Also I create the SS with layer curb & 0 but in the If.ent.layer test I
don't see how to inclues addtional layers without adding another line and
place the addtional layer names in it. can you add a array of layers to the
ent.layer test with type of ent.
As always thanks you for any comments
John Coon
Set ss = ThisDrawing.SelectionSets.Add("ss")
fType(0) = 8: fData(0) = "CURB, 0"
fType(1) = 0: fData(1) = "LINE,ARC,AcadLWPolyline"
ss.Select acSelectionSetAll, , , fType, fData
For Each ent In ThisDrawing.ModelSpace
If TypeOf ent Is AcadArc Then
dblRadius = ent.RADIUS
End If
If ent.Layer = "CURB" And (TypeOf ent Is AcadArc Or TypeOf ent Is
AcadLine Or TypeOf ent Is AcadLWPolyline) Then
count = count + 1
Dim varDataPnt As Variant
varDataPnt = ent.EndPoint
'''''''''''''''''''''''''''''''''''''''''''''''more stuff....load land
alingment for station offset values
Set mtxtLabel = ThisDrawing.ModelSpace.AddMText(varDataPnt, dblWidth,
stastrlen)
mtxtLabel.Height = dblHeight
mtxtLabel.Rotation = dblRot
If TypeOf ent Is AcadArc Then
Set mtxtLabel = ThisDrawing.ModelSpace.AddMText(varDataPnt, dblWidth,
strradius)
mtxtLabel.Height = dblHeight
mtxtLabel.Rotation = dblRot
End If
End If
Print #1, strSta & "," & strOff & "," & dblRadius & "," & STRY & "," & STRX
& "," & dblDir