Hi,
Further to Jeff's comment, you may find that you cannot actually select a
Parcel segment and then find that it is a AeccParcelSegmentLine.
If you need to work with the Segment, then you will probably find you need
to select the Parcel (which you do by Selecting the Parcel label) and then
selecting a point, followed by examining the parcel segment collection to
find which one is nearest the point you select.
Here's some very rough code I used to confirm my thinking
Sub test()
Dim objSelect As AcadObject
Dim pt(0 To 2) As Double
Dim ff As AeccParcelSegmentLine
Dim gg As AeccParcel
Dim hh As AeccParcelLoop
' ThisDrawing.Utility.GetEntity objSelect, pt, "Select a parcel side"
ThisDrawing.Utility.GetEntity objSelect, pt, "Select a parcel label"
' If TypeOf objSelect Is AeccParcelSegmentLineThen
If TypeOf objSelect Is AeccParcel Then
' Set ff = objSelect
Set gg = objSelect
Set hh = gg.ParcelLoops.Item(0)
Set ff = hh.Item(1)
End If
End Sub
To work with Parcel sides - depending on what you want to do, you may find
it easier to set up a form allowing the user to select a Site for a list of
sites with parcels
From the site populate a list of parcels in the site
Allow the user to select a parcel and zoom to the parcel, draw a polyline
with arrow head along the first segment and give the user a
option and/or type in a segment number and/or select the segment number from
a list of the number of segments in that parcel to identify the required
side. Update the polyline (and zoom window if relevant) each time the user
changes anything in the form.
--
Laurie Comerford
CADApps
www.cadapps.com.au
www.civil3Dtools.com
"Jeff Mishler" wrote in message
news:[email protected]...
Yes, you must reference the Civil3D Land Libraries, as outlined in the
"Getting Started" section of the Civil API reference.
wrote in message news:[email protected]...
I am trying to use some of your code below for a different application. I
can't get my VBA to recognize the type of Aecc. . . objects.
This line in my code:
If TypeOf objSelect Is AeccParcelSegmentLine Then
renders a
Compile error:
User-defined type not defined
Error.
Do I need to initiate some reference? Is there something I'm missing?
Thanks,
David