<?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: Lisp to extract vertical distance between points? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12943168#M10873</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;to do without Civ3d will probably need a surface converted to a TIN of 3dfaces, as you can work out a new point XYZ on a 3dface. Civ3D as default does not make 3dfaces when making surfaces, it is an option to make them. Understand your code works out the answer nice idea +ve &amp;amp; -ve, but the issue is how to make the new points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So again using Projectgeometry is probably the way to go to make points. Can do in loop for multiple points.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 00:04:55 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2024-08-07T00:04:55Z</dc:date>
    <item>
      <title>Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12931046#M10862</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am having to come up with a solution in AutoCAD in an attempt to avoid having to use Civil 3D.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given a number of pairs of points (each of the two points in a pair having the same x and y coordiantes but potentially different z coordinates). is there a way to insert some text at the x,y common coordinates of each pair to display the difference in z for each pair?&lt;/P&gt;&lt;P&gt;I need to numerically display the diferences between as-built vs designed surfaces. My thinking is to use PROJECTGEOMETRY to vertically project surveyed points onto the designed surface and obtain the above mentioned text to describe the differences.&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 13:36:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12931046#M10862</guid>
      <dc:creator>Bogdan_AioaneA8TAK</dc:creator>
      <dc:date>2024-07-31T13:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12931083#M10863</link>
      <description>&lt;P&gt;Point &lt;EM&gt;objects&lt;/EM&gt; specifically?&amp;nbsp; Or, to put it differently, &lt;EM&gt;in what format&lt;/EM&gt; would you be "&lt;SPAN&gt;Given a number of pairs of points"?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 13:50:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12931083#M10863</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-07-31T13:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12932128#M10864</link>
      <description>&lt;P&gt;If Civ3D are they Cogo points or Cogo &amp;amp; a Point ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just read again "&lt;SPAN&gt;&lt;STRONG&gt;PROJECTGEOMETRY to vertically&lt;/STRONG&gt; project surveyed points onto the designed surface" so a point may not have any design point to compare to, all hope is not lost, you can get a XYZ of a point on a 3dface. Ie a surface. Do you have CIV3D it has a add point to surface function, saves a lot of code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where I am, one state Road authority does quality checks on highways and they survey Random points and do the same compare to design.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Post a dwg.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 22:37:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12932128#M10864</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-07-31T22:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12941595#M10865</link>
      <description>&lt;P&gt;Yes,&lt;/P&gt;&lt;P&gt;The input to the exercise are point objects. Then projecting them to a surface gives me each point's "pair"&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 08:27:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12941595#M10865</guid>
      <dc:creator>Bogdan_AioaneA8TAK</dc:creator>
      <dc:date>2024-08-06T08:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12941600#M10866</link>
      <description>It can't be Civil unfortunately. I have to come up with a way to do it in AutoCad</description>
      <pubDate>Tue, 06 Aug 2024 08:30:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12941600#M10866</guid>
      <dc:creator>Bogdan_AioaneA8TAK</dc:creator>
      <dc:date>2024-08-06T08:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12941979#M10867</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15162918"&gt;@Bogdan_AioaneA8TAK&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The input to the exercise are point objects. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And would the User be asked to select them?&amp;nbsp; Or should the routine be written to find all Points in the drawing [assuming there wouldn't be any that you don't want included], or all on a certain Layer, or...?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 12:47:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12941979#M10867</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-08-06T12:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942023#M10868</link>
      <description>&lt;P&gt;I think the points can be placed in two layers (one for the mai points and the other for the projected points) and if the user has to name said layers something specific, so be it.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 13:10:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942023#M10868</guid>
      <dc:creator>Bogdan_AioaneA8TAK</dc:creator>
      <dc:date>2024-08-06T13:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942088#M10869</link>
      <description>&lt;P&gt;Reading Message 1 again, now it's not clear to me whether the "projected points" &lt;EM&gt;already exist&lt;/EM&gt; to be selected [or found by the routine without User selection], or would be &lt;EM&gt;generated by the routine&lt;/EM&gt; as the result of using PROJECTGEOMETRY on survey Points projecting onto a design-intent surface.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words, what exists at the start of a presumed command?&amp;nbsp; Pairs of Points already established?&amp;nbsp; [You have already used PROJECTGEOMETRY, perhaps?]&amp;nbsp; Or &lt;EM&gt;one&lt;/EM&gt; set of as-built Points and a surface of some kind to project them onto, to &lt;EM&gt;create another set&lt;/EM&gt; of design-intent Points for Z-difference comparison?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 13:35:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942088#M10869</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-08-06T13:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942106#M10870</link>
      <description>&lt;P&gt;the user can manually run the projecgeometry command and obtain the projected points (dont think its worth adding the extra complexity to the routine) so at the start of the routine one would already have prepared two layers with points (one with the main poits (say layer1) and the other with the corresponding projected points (layer2)) leaving the routine with the task of measuring the distance from poins in layer1 to coresponding points in layer2 and displaying the value as text at the xy cordinates of each pair of points.&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 13:41:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942106#M10870</guid>
      <dc:creator>Bogdan_AioaneA8TAK</dc:creator>
      <dc:date>2024-08-06T13:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942283#M10871</link>
      <description>&lt;P&gt;Yes, that's clear.&amp;nbsp; How 'bout something like this quickie?&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:PPDeltaZ ; = Point Pairs Delta [difference in] Z coordinates
  (/ ssA n ptA ssD insA ptD insD)
  (if (setq ssA (ssget "_X" '((0 . "POINT") (8 . "YourAsBuiltLayer"))))
    (repeat (setq n (sslength ssA)); then [outer]
      (setq
        ptA (ssname ssA (setq n (1- n)))
        insA (cdr (assoc 10 (entget ptA)))
      ); setq
      (if (setq ssD (ssget insA '((0 . "POINT") (8 . "YourDesignLayer"))))
        (progn ; then [inner]
          (setq
            ptD (ssname ssD 0)
            insD (cdr (assoc 10 (entget ptD)))
          ); setq
          (command "_.text"
            "_mc" (mapcar '/ (mapcar '+ insA insD) '(2 2 2))
            "" "" (rtos (- (caddr insA) (caddr insD)) 2 3)
          ); command
        ); progn
      ); if [inner]
    ); repeat
  ); if [outer]
  (prin1)
)&lt;/LI-CODE&gt;
&lt;P&gt;Minimally tested.&amp;nbsp; EDIT the Layer names in lines 3 &amp;amp; 9 [and the command name if you don't like mine].&amp;nbsp; Run it in WCS Plan view [assuming the Points are in WCS terms] or it won't find the DesignLayer Point for each AsBuiltLayer Point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It puts the Text halfway between the Points in elevation.&amp;nbsp; It uses whatever the current Text Style [assumed to &lt;EM&gt;not&lt;/EM&gt; have a fixed height] and size and Layer are.&amp;nbsp; EDIT the Text mode and precision in line 17.&amp;nbsp; All that optional/variable stuff could be forced within the command if needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the Text is &lt;EM&gt;positive&lt;/EM&gt;, the AsBuilt Point is &lt;EM&gt;above&lt;/EM&gt; the Design Point; if &lt;EM&gt;negative&lt;/EM&gt;, it's &lt;EM&gt;below&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 14:55:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942283#M10871</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-08-06T14:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942313#M10872</link>
      <description>&lt;P&gt;that is perfect. this will be incredibly useful&lt;BR /&gt;thank you so much&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 15:06:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12942313#M10872</guid>
      <dc:creator>Bogdan_AioaneA8TAK</dc:creator>
      <dc:date>2024-08-06T15:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12943168#M10873</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;to do without Civ3d will probably need a surface converted to a TIN of 3dfaces, as you can work out a new point XYZ on a 3dface. Civ3D as default does not make 3dfaces when making surfaces, it is an option to make them. Understand your code works out the answer nice idea +ve &amp;amp; -ve, but the issue is how to make the new points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So again using Projectgeometry is probably the way to go to make points. Can do in loop for multiple points.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 00:04:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12943168#M10873</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-08-07T00:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12943194#M10874</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... Projectgeometry is probably the way to go to make points. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[Read Message 9 -- they've already done that before they get to the point of calling the command.]&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 00:20:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12943194#M10874</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-08-07T00:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp to extract vertical distance between points?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12943277#M10875</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;yes should have read the posts a bit more carefully, as a side note there is another command that moves a point to a surface so could use that method, get the original XYZ, move it, get new XYZ then undo, so no need for 2 layers, did a google and found it as a possible solution, now where was it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/civil-3d-forum/moving-points-to-a-surface/td-p/6242064" target="_blank" rel="noopener"&gt;Solved: Moving Points TO a Surface - Autodesk Community - Civil 3D&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 01:48:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-extract-vertical-distance-between-points/m-p/12943277#M10875</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-08-07T01:48:28Z</dc:date>
    </item>
  </channel>
</rss>

