<?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 Help with CSV Cogo export script in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12535339#M2448</link>
    <description>&lt;P&gt;I am trying to edit a script that I have to also write the COGO custom property from below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="carl3ZPF6_0-1706825690502.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1321262i9E0DFBE5ACB1F3CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="carl3ZPF6_0-1706825690502.png" alt="carl3ZPF6_0-1706825690502.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code. everything works except for the (setq bearing (vlax-get-property cogo 'Bearing)) line. Is there a way to export these custom properties in LISP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:cogoExport ( / ss fileName f n)
  (setq ss (ssget '(( 0 . "AECC_COGO_POINT"))))
  (setq fileName (getfiled "Export to" "" "csv" 1))
  (if (and ss fileName)
    (progn
      (setq f (open fileName "w"))
	  
      (setq n 0)
	  (setq line "CAD Index, x, y, z, ," )
	  (write-line line f)
      (repeat (sslength ss)
	 
	(setq cogo (vlax-ename-&amp;gt;vla-object (ssname ss n)))
	
	(setq line (cogo:pntToString cogo))
	(write-line line f)
	(setq n (+ n 1))
	)
      (close f)
      (princ (strcat "\nPoints have been exported. Quantity: " (itoa n)))
      )
    (princ "\nCommand Canceled.")
    )
  (princ)
  )

(defun cogo:pntToString (cogo / num northing easting elev rawDesc layer)
  (setq num (vlax-get-property cogo 'Number))
  (setq easting (rtos (vlax-get-property cogo 'Easting) 2 3))
  (setq northing (rtos (vlax-get-property cogo 'Northing) 2 3))
  (setq elev (rtos (vlax-get-property cogo 'Elevation) 2 3))
  (setq rawDesc (vlax-get-property cogo 'RawDescription))
  (setq layer (vlax-get-property cogo 'Layer))
  (setq bearing (vlax-get-property cogo 'Bearing))
  (strcat (itoa num) "," easting  "," northing "," elev "," rawDesc "," layer "," bearing)
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2024 22:14:53 GMT</pubDate>
    <dc:creator>carl3ZPF6</dc:creator>
    <dc:date>2024-02-01T22:14:53Z</dc:date>
    <item>
      <title>Help with CSV Cogo export script</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12535339#M2448</link>
      <description>&lt;P&gt;I am trying to edit a script that I have to also write the COGO custom property from below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="carl3ZPF6_0-1706825690502.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1321262i9E0DFBE5ACB1F3CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="carl3ZPF6_0-1706825690502.png" alt="carl3ZPF6_0-1706825690502.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code. everything works except for the (setq bearing (vlax-get-property cogo 'Bearing)) line. Is there a way to export these custom properties in LISP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:cogoExport ( / ss fileName f n)
  (setq ss (ssget '(( 0 . "AECC_COGO_POINT"))))
  (setq fileName (getfiled "Export to" "" "csv" 1))
  (if (and ss fileName)
    (progn
      (setq f (open fileName "w"))
	  
      (setq n 0)
	  (setq line "CAD Index, x, y, z, ," )
	  (write-line line f)
      (repeat (sslength ss)
	 
	(setq cogo (vlax-ename-&amp;gt;vla-object (ssname ss n)))
	
	(setq line (cogo:pntToString cogo))
	(write-line line f)
	(setq n (+ n 1))
	)
      (close f)
      (princ (strcat "\nPoints have been exported. Quantity: " (itoa n)))
      )
    (princ "\nCommand Canceled.")
    )
  (princ)
  )

(defun cogo:pntToString (cogo / num northing easting elev rawDesc layer)
  (setq num (vlax-get-property cogo 'Number))
  (setq easting (rtos (vlax-get-property cogo 'Easting) 2 3))
  (setq northing (rtos (vlax-get-property cogo 'Northing) 2 3))
  (setq elev (rtos (vlax-get-property cogo 'Elevation) 2 3))
  (setq rawDesc (vlax-get-property cogo 'RawDescription))
  (setq layer (vlax-get-property cogo 'Layer))
  (setq bearing (vlax-get-property cogo 'Bearing))
  (strcat (itoa num) "," easting  "," northing "," elev "," rawDesc "," layer "," bearing)
  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 22:14:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12535339#M2448</guid>
      <dc:creator>carl3ZPF6</dc:creator>
      <dc:date>2024-02-01T22:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with CSV Cogo export script</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12536714#M2449</link>
      <description>&lt;P&gt;'Bearing is not a property of a COGO Point. You might need to use an angle function to calculate the angle between points. What is it you're going for with Bearing?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 14:45:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12536714#M2449</guid>
      <dc:creator>tcorey</dc:creator>
      <dc:date>2024-02-02T14:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help with CSV Cogo export script</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12536844#M2450</link>
      <description>&lt;P&gt;This is a custom property, I am looking for the text string that was assigned to the Bearing property in the image above, not rotation.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 15:39:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12536844#M2450</guid>
      <dc:creator>carl3ZPF6</dc:creator>
      <dc:date>2024-02-02T15:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with CSV Cogo export script</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537023#M2451</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13951520"&gt;@carl3ZPF6&lt;/a&gt;&amp;nbsp;is the Bearing property a UserDefinedProperty? Can you post a drawing with a few of these points in it?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 16:48:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537023#M2451</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2024-02-02T16:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with CSV Cogo export script</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537057#M2452</link>
      <description>&lt;P&gt;Yes user defined. See attached drawing.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 17:11:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537057#M2452</guid>
      <dc:creator>carl3ZPF6</dc:creator>
      <dc:date>2024-02-02T17:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with CSV Cogo export script</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537375#M2453</link>
      <description>&lt;P class="lia-align-justify"&gt;Ok, 2 things need to be done. First, you must assign the Classification to a PointGroup the points are in...in this drawing's case, the "_All Points" group (note that older releases of C3D did not allow assigning the classification to this group). If the points are not in a group with the Classification set you will get an error.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-02-02_12-09-32.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1321689iCD3340E023811AF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2024-02-02_12-09-32.png" alt="2024-02-02_12-09-32.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Second, change the line to get the Bearing to this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq bearing (vlax-invoke cogo 'getuserdefinedpropertyvalue "Bearing"))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that if you want to get other UDP values the UDPs are case sensitive. This fact has caused others much frustration in the past.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 20:13:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537375#M2453</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2024-02-02T20:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with CSV Cogo export script</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537426#M2454</link>
      <description>&lt;P&gt;Thank you Sir!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 20:43:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/help-with-csv-cogo-export-script/m-p/12537426#M2454</guid>
      <dc:creator>carl3ZPF6</dc:creator>
      <dc:date>2024-02-02T20:43:46Z</dc:date>
    </item>
  </channel>
</rss>

