<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Export Parcel as LWPolyline in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983366#M25432</link>
    <description>Jeff,&lt;BR /&gt;
&lt;BR /&gt;
I am new at the Civil 3D thing. Where can I find the Civil API reference.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
David</description>
    <pubDate>Thu, 26 Jul 2007 22:06:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-07-26T22:06:40Z</dc:date>
    <item>
      <title>Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983362#M25428</link>
      <description>Does anyone have any sample code to export an parcel as a LWPolyline?  I noticed that there was a built in function to export an alignment as a LWPolyline, but I don't see one for parcels.</description>
      <pubDate>Thu, 31 May 2007 20:31:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983362#M25428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-31T20:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983363#M25429</link>
      <description>Here ya go....I tested this with all the parcels in the 2008 Tutorial &lt;BR /&gt;
drawing "Parcel-3".&lt;BR /&gt;
&lt;BR /&gt;
[code]&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
&lt;BR /&gt;
Sub Parcel2Pline()&lt;BR /&gt;
Dim Parcel As AeccParcel&lt;BR /&gt;
Dim pLoop As AeccParcelLoop&lt;BR /&gt;
Dim pObj As Object&lt;BR /&gt;
Dim parLine As AeccParcelSegmentLine&lt;BR /&gt;
Dim parArc As AeccParcelSegmentCurve&lt;BR /&gt;
Dim oEnt As AcadEntity&lt;BR /&gt;
Dim vPick As Variant&lt;BR /&gt;
Dim vCoords() As Double&lt;BR /&gt;
Dim vBulge() As Double&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
Dim i As Integer&lt;BR /&gt;
&lt;BR /&gt;
Do Until Err.Number &amp;lt;&amp;gt; 0&lt;BR /&gt;
    ThisDrawing.Utility.GetEntity oEnt, vPick, vbCr &amp;amp; "Select Parcel to draw &lt;BR /&gt;
pline of: "&lt;BR /&gt;
    If TypeOf oEnt Is AeccParcel Then&lt;BR /&gt;
        Set Parcel = oEnt&lt;BR /&gt;
        Set pLoop = Parcel.ParcelLoops(0)&lt;BR /&gt;
        ReDim vCoords(pLoop.Count * 2 + 1)&lt;BR /&gt;
        ReDim vBulge(pLoop.Count - 1)&lt;BR /&gt;
        i = 0&lt;BR /&gt;
        For Each pObj In pLoop&lt;BR /&gt;
            If TypeOf pObj Is AeccParcelSegmentLine Then&lt;BR /&gt;
                Set parLine = pObj&lt;BR /&gt;
                If i = 0 Then&lt;BR /&gt;
                    vCoords(i) = parLine.StartX&lt;BR /&gt;
                    vCoords(i + 1) = parLine.StartY&lt;BR /&gt;
                End If&lt;BR /&gt;
                vCoords((i + 1) * 2) = parLine.EndX&lt;BR /&gt;
                vCoords((i + 1) * 2 + 1) = parLine.EndY&lt;BR /&gt;
            Else&lt;BR /&gt;
                Set parArc = pObj&lt;BR /&gt;
                If i = 0 Then&lt;BR /&gt;
                    vCoords(i) = parArc.StartX&lt;BR /&gt;
                    vCoords(i + 1) = parArc.StartY&lt;BR /&gt;
                End If&lt;BR /&gt;
                vCoords((i + 1) * 2) = parArc.EndX&lt;BR /&gt;
                vCoords((i + 1) * 2 + 1) = parArc.EndY&lt;BR /&gt;
                vBulge(i) = parArc.Bulge&lt;BR /&gt;
            End If&lt;BR /&gt;
            i = i + 1&lt;BR /&gt;
        Next&lt;BR /&gt;
        Dim oPline As AcadLWPolyline&lt;BR /&gt;
        Set oPline = ThisDrawing.ModelSpace.AddLightWeightPolyline(vCoords)&lt;BR /&gt;
        For i = 0 To UBound(vBulge)&lt;BR /&gt;
            oPline.SetBulge i, vBulge(i)&lt;BR /&gt;
        Next&lt;BR /&gt;
    End If&lt;BR /&gt;
Loop&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
[/code]&lt;BR /&gt;
&lt;BR /&gt;
&lt;JWILKERSON&gt; wrote in message news:5612938@discussion.autodesk.com...&lt;BR /&gt;
Does anyone have any sample code to export an parcel as a LWPolyline?  I &lt;BR /&gt;
noticed that there was a built in function to export an alignment as a &lt;BR /&gt;
LWPolyline, but I don't see one for parcels.&lt;/JWILKERSON&gt;</description>
      <pubDate>Thu, 31 May 2007 22:01:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983363#M25429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-31T22:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983364#M25430</link>
      <description>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.&lt;BR /&gt;
&lt;BR /&gt;
This line in my code:&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf objSelect Is AeccParcelSegmentLine Then&lt;BR /&gt;
&lt;BR /&gt;
renders a &lt;BR /&gt;
&lt;BR /&gt;
Compile error:&lt;BR /&gt;
User-defined type not defined&lt;BR /&gt;
&lt;BR /&gt;
Error.&lt;BR /&gt;
&lt;BR /&gt;
Do I need to initiate some reference?  Is there something I'm missing?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
David</description>
      <pubDate>Thu, 26 Jul 2007 18:24:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983364#M25430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-07-26T18:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983365#M25431</link>
      <description>Yes, you must reference the Civil3D Land Libraries, as outlined in the &lt;BR /&gt;
"Getting Started" section of the Civil API reference.&lt;BR /&gt;
&lt;BR /&gt;
&lt;DLINFORD&gt; wrote in message news:5670799@discussion.autodesk.com...&lt;BR /&gt;
I am trying to use some of your code below for a different application.  I &lt;BR /&gt;
can't get my VBA to recognize the type of Aecc. . .  objects.&lt;BR /&gt;
&lt;BR /&gt;
This line in my code:&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf objSelect Is AeccParcelSegmentLine Then&lt;BR /&gt;
&lt;BR /&gt;
renders a&lt;BR /&gt;
&lt;BR /&gt;
Compile error:&lt;BR /&gt;
User-defined type not defined&lt;BR /&gt;
&lt;BR /&gt;
Error.&lt;BR /&gt;
&lt;BR /&gt;
Do I need to initiate some reference?  Is there something I'm missing?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
David&lt;/DLINFORD&gt;</description>
      <pubDate>Thu, 26 Jul 2007 21:43:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983365#M25431</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-07-26T21:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983366#M25432</link>
      <description>Jeff,&lt;BR /&gt;
&lt;BR /&gt;
I am new at the Civil 3D thing. Where can I find the Civil API reference.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
David</description>
      <pubDate>Thu, 26 Jul 2007 22:06:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983366#M25432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-07-26T22:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983367#M25433</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Further to Jeff's comment, you may find that you cannot actually select a &lt;BR /&gt;
Parcel segment and then find that it is a AeccParcelSegmentLine.&lt;BR /&gt;
&lt;BR /&gt;
If you need to work with the Segment, then you will probably find you need &lt;BR /&gt;
to select the Parcel (which you do by Selecting the Parcel label) and then &lt;BR /&gt;
selecting a point, followed by examining the parcel segment collection to &lt;BR /&gt;
find which one is nearest the point you select.&lt;BR /&gt;
&lt;BR /&gt;
Here's some very rough code I used to confirm my thinking&lt;BR /&gt;
&lt;BR /&gt;
Sub test()&lt;BR /&gt;
Dim objSelect As AcadObject&lt;BR /&gt;
Dim pt(0 To 2) As Double&lt;BR /&gt;
Dim ff As AeccParcelSegmentLine&lt;BR /&gt;
Dim gg As AeccParcel&lt;BR /&gt;
Dim hh As AeccParcelLoop&lt;BR /&gt;
'  ThisDrawing.Utility.GetEntity objSelect, pt, "Select a parcel side"&lt;BR /&gt;
  ThisDrawing.Utility.GetEntity objSelect, pt, "Select a parcel label"&lt;BR /&gt;
' If TypeOf objSelect Is AeccParcelSegmentLineThen&lt;BR /&gt;
If TypeOf objSelect Is AeccParcel Then&lt;BR /&gt;
'  Set ff = objSelect&lt;BR /&gt;
  Set gg = objSelect&lt;BR /&gt;
  Set hh = gg.ParcelLoops.Item(0)&lt;BR /&gt;
  Set ff = hh.Item(1)&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
To work with Parcel sides - depending on what you want to do, you may find &lt;BR /&gt;
it easier to set up a form allowing the user to select a Site for a list of &lt;BR /&gt;
sites with parcels&lt;BR /&gt;
From the site populate a list of parcels in the site&lt;BR /&gt;
Allow the user to select a parcel and zoom to the parcel, draw a polyline &lt;BR /&gt;
with arrow head along the first segment and give the user a &lt;NEXT&gt;&lt;PREVIOUS&gt; &lt;BR /&gt;
option and/or type in a segment number and/or select the segment number from &lt;BR /&gt;
a list of the number of segments in that parcel to identify the required &lt;BR /&gt;
side.  Update the polyline (and zoom window if relevant) each time the user &lt;BR /&gt;
changes anything in the form.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
&lt;BR /&gt;
Laurie Comerford&lt;BR /&gt;
CADApps&lt;BR /&gt;
www.cadapps.com.au&lt;BR /&gt;
www.civil3Dtools.com&lt;BR /&gt;
&lt;BR /&gt;
"Jeff Mishler" &lt;MIFFATSONICDOTNETIS_ALL&gt; wrote in message &lt;BR /&gt;
news:5671165@discussion.autodesk.com...&lt;BR /&gt;
Yes, you must reference the Civil3D Land Libraries, as outlined in the&lt;BR /&gt;
"Getting Started" section of the Civil API reference.&lt;BR /&gt;
&lt;BR /&gt;
&lt;DLINFORD&gt; wrote in message news:5670799@discussion.autodesk.com...&lt;BR /&gt;
I am trying to use some of your code below for a different application.  I&lt;BR /&gt;
can't get my VBA to recognize the type of Aecc. . .  objects.&lt;BR /&gt;
&lt;BR /&gt;
This line in my code:&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf objSelect Is AeccParcelSegmentLine Then&lt;BR /&gt;
&lt;BR /&gt;
renders a&lt;BR /&gt;
&lt;BR /&gt;
Compile error:&lt;BR /&gt;
User-defined type not defined&lt;BR /&gt;
&lt;BR /&gt;
Error.&lt;BR /&gt;
&lt;BR /&gt;
Do I need to initiate some reference?  Is there something I'm missing?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
David&lt;/DLINFORD&gt;&lt;/MIFFATSONICDOTNETIS_ALL&gt;&lt;/PREVIOUS&gt;&lt;/NEXT&gt;</description>
      <pubDate>Thu, 26 Jul 2007 22:20:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983367#M25433</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-07-26T22:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983368#M25434</link>
      <description>Hi David,&lt;BR /&gt;
First, in C3D press F1 for the Help, in the left pane expand AutoCAD Civil3D &lt;BR /&gt;
Help, select AutoCAD Civil 3D API Help, in the right pane select AutoCAD &lt;BR /&gt;
Civil 3D API Reference, the first page displayed is the Getting Started &lt;BR /&gt;
guide.....&lt;BR /&gt;
&lt;BR /&gt;
Good Luck&lt;BR /&gt;
&lt;BR /&gt;
&lt;DLINFORD&gt; wrote in message news:5671163@discussion.autodesk.com...&lt;BR /&gt;
Jeff,&lt;BR /&gt;
&lt;BR /&gt;
I am new at the Civil 3D thing. Where can I find the Civil API reference.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
David&lt;/DLINFORD&gt;</description>
      <pubDate>Thu, 26 Jul 2007 22:42:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983368#M25434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-07-26T22:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Export Parcel as LWPolyline</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983369#M25435</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
In the VBA editor, select [Tools][References]&lt;BR /&gt;
&lt;BR /&gt;
Look at the attached screen grabs will give you an idea what is needed for &lt;BR /&gt;
R2008.  These come from the Parcel Volumes report which I'm currently &lt;BR /&gt;
adjusting to Australian Standards and the "Report_Utilities" is generally &lt;BR /&gt;
only relevant for the Report projects.&lt;BR /&gt;
&lt;BR /&gt;
However, the best way of overcoming the libraries issues is to ALWAYS start &lt;BR /&gt;
a new Civil 3D project from one of the supplied sample files.  That way the &lt;BR /&gt;
libraries will already be in place and you will have the code to initiate &lt;BR /&gt;
Civil 3D in place.  Probably quite a bit of other code you need will be in &lt;BR /&gt;
the sample file.&lt;BR /&gt;
&lt;BR /&gt;
Note that with Civil 3D the libraries are version dependent and need to be &lt;BR /&gt;
changed to run in the different versions of Civil 3D.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
&lt;BR /&gt;
Laurie Comerford&lt;BR /&gt;
CADApps&lt;BR /&gt;
www.cadapps.com.au&lt;BR /&gt;
www.civil3Dtools.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;DLINFORD&gt; wrote in message news:5671163@discussion.autodesk.com...&lt;BR /&gt;
Jeff,&lt;BR /&gt;
&lt;BR /&gt;
I am new at the Civil 3D thing. Where can I find the Civil API reference.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
David&lt;/DLINFORD&gt;</description>
      <pubDate>Thu, 26 Jul 2007 22:47:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/export-parcel-as-lwpolyline/m-p/1983369#M25435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-07-26T22:47:32Z</dc:date>
    </item>
  </channel>
</rss>

