<?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 Alignment.PointLocation on aligment with station equations in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6997230#M12724</link>
    <description>&lt;P&gt;The Alignment.PointLocation method only works with raw stations which presents a problem when the alignment contains station equations.&lt;/P&gt;&lt;P&gt;For example...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A 1000' alignment with a start station set to 0.00 will have a raw end station of 1000.&lt;BR /&gt;A station equation created at 5+00 with a station ahead set to 20+00 will result in the end station label displayed as 25+00 but the raw end station will still be 1000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a routine that prompts the user for a station/offset from which I need to retrieve the actual coordinate. If the user enters 2600 for the station and I use this value in Alignment.PointLocation, it will throw a PointNotOnEntity exception because it expects a raw station between 0 and 1000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know of way to retrieve the coordinates of a location along an alignment using station/offset values taking into account station equations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mike&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2017 13:21:02 GMT</pubDate>
    <dc:creator>mszanto</dc:creator>
    <dc:date>2017-04-05T13:21:02Z</dc:date>
    <item>
      <title>Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6997230#M12724</link>
      <description>&lt;P&gt;The Alignment.PointLocation method only works with raw stations which presents a problem when the alignment contains station equations.&lt;/P&gt;&lt;P&gt;For example...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A 1000' alignment with a start station set to 0.00 will have a raw end station of 1000.&lt;BR /&gt;A station equation created at 5+00 with a station ahead set to 20+00 will result in the end station label displayed as 25+00 but the raw end station will still be 1000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a routine that prompts the user for a station/offset from which I need to retrieve the actual coordinate. If the user enters 2600 for the station and I use this value in Alignment.PointLocation, it will throw a PointNotOnEntity exception because it expects a raw station between 0 and 1000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know of way to retrieve the coordinates of a location along an alignment using station/offset values taking into account station equations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mike&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 13:21:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6997230#M12724</guid>
      <dc:creator>mszanto</dc:creator>
      <dc:date>2017-04-05T13:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6998210#M12725</link>
      <description>&lt;P&gt;These object values will give you the information necessary to calculate what you need:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(setq eqlist NIL)
; anobj is the "AeccDbAlignment" object (the Alignment)
(vlax-for item (vlax-get-property anobj 'StationEquations)
  (setq eqlist
         (append eqlist
                 (list
                   (list
                     (vlax-get-property item 'RawStationBack)
                     (vlax-get-property item 'StationAhead)
                     (vlax-get-property item 'StationBack)
                     (vlax-get-property item 'Type)
                   )
                 )
         )
  ); Create list of all station equation objects properties
)
(setq startsta (vlax-get-property anobj 'StartingStation); Store start station
      endsta (vlax-get-property anobj 'EndingStation); Store end station
)
; IAeccStationEquation: IAeccStationEquation Interface
; Property values:
;   RawStationBack = 9722.58
;   StationAhead = 10000.0
;   StationBack (RO) = 9722.58
;   Type = 1
&lt;/PRE&gt;
&lt;P&gt;**** The code above was edited to produce the following&amp;nbsp;list structure as intended ****&lt;/P&gt;
&lt;P&gt;My alignment data produced this list for my one station equation:&lt;/P&gt;
&lt;P&gt;(&lt;SPAN&gt;(9722.58 10000.0 9722.58 1))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Each Station Equation is a list of its four values&amp;nbsp;(9722.58 10000.0 9722.58 1)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 18:26:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6998210#M12725</guid>
      <dc:creator>hencoop</dc:creator>
      <dc:date>2017-04-05T18:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6998269#M12726</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I already came to the conclusion that I would have to get the station equations and reverse calculate the raw stations. I was hoping there was something in the API that was more direct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know people have requested this in the past from older messages in this forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 18:41:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6998269#M12726</guid>
      <dc:creator>mszanto</dc:creator>
      <dc:date>2017-04-05T18:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6998403#M12727</link>
      <description>&lt;P&gt;No problem,&lt;/P&gt;
&lt;P&gt;I haven't worked this out for myself before. &amp;nbsp;Most of what I do uses&amp;nbsp;a &lt;A href="http://paracadd.com/gpdgn/gp_main.htm" target="_blank"&gt;custom app&lt;/A&gt; for cross country water and sewer pipelines that makes&amp;nbsp;very limited use of AutoCAD Civil 3D Alignments. &amp;nbsp;I have not had a need to use&amp;nbsp;Station Equations with C3D Alignments. &amp;nbsp;I fleshed out my&amp;nbsp;code to print out the information I might need and to quickly show whether there are any Station Equations assigned for the alignment. &amp;nbsp;I've attached it here for those that might have a use for it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 19:34:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/6998403#M12727</guid>
      <dc:creator>hencoop</dc:creator>
      <dc:date>2017-04-05T19:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7012338#M12728</link>
      <description>&lt;P&gt;Wouldn't GetPointAtDistance get you what you're looking for? &amp;nbsp;You may have to subtract starting station, I'm not sure. &amp;nbsp;I haven't messed with RawStation values at all, yet, within Alignments.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 14:44:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7012338#M12728</guid>
      <dc:creator>tdivittis</dc:creator>
      <dc:date>2017-04-12T14:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7012611#M12729</link>
      <description>&lt;P&gt;Its far more complicated than that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We were asked by a state DOT to merge&amp;nbsp;all their CL alignments into single alignments while maintaining the original stationing and direction. In order to do this we needed to find all the alignments that had common end points or overlapping segments and merge them together to create extremely long alignments. Because each original alignment was surveyed at a different point in time and had different starting stations and directions it required us to create a station equation at each point where they were merged.&lt;/P&gt;&lt;P&gt;In one example there were 38 original alignments that were merged, resulting in a single alignment 50 miles long with 37 station equations with most station equations increasing and some station equations decreasing. As you can imagine, due to the number of station equations, there will be many duplicate stations along the alignment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fortunately,&amp;nbsp;I was able to develop a robust tool set using the .NET API to automate this process which was a great time saver.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now comes the next phase where we need to develop a tool that allows a user to enter in a station/offset to find that location along the alignment and perform some additional work. Because the station could exist at numerous locations along the alignment (due to station equations) I need a function to return all the possible positions along the alignment for that station so that I can display them to the user from which they can choose the correct location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the rub, I know that this functionality exists in Civil 3D. Just run the command to location point at station/offset along an alignment and a dialog is displayed if more than one exists (see attached).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping that I wouldn't have to write this functionality but in retrospect it was very easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works something like this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Loop through all station equations and examine each pair of consecutive station equations.&lt;/P&gt;&lt;P&gt;2. If station equation 1 is ascending, determine if the specified station is after the station ahead of equation 1 and before the station back of equation 2.&lt;/P&gt;&lt;P&gt;3. If station equation 1 is descending, determine if the specified station is before the station ahead of equation 1 and after the station back of equation 2.&lt;/P&gt;&lt;P&gt;4. If 2 or 3 is true, get the absolute difference between the specified station and&amp;nbsp;station ahead of equation 1 and add this to the raw station back of equation 1 to get the raw station of the specified location.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mike Szanto&lt;/STRONG&gt; | Applications Developer&lt;/P&gt;&lt;P&gt;mszanto@microdesk.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 16:09:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7012611#M12729</guid>
      <dc:creator>mszanto</dc:creator>
      <dc:date>2017-04-12T16:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7016360#M12730</link>
      <description>&lt;P&gt;Have you considered using System.DataTables to store your equation information? &amp;nbsp;It may provide an easier method of filtering, since you can apply a Filter, then read the DefaultView, which would contain the matching data? &amp;nbsp;(I've done something similar, albeit simpler, at least from the station equation handling perspective.)&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 00:32:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7016360#M12730</guid>
      <dc:creator>tdivittis</dc:creator>
      <dc:date>2017-04-14T00:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Alignment.PointLocation on aligment with station equations</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7485778#M12731</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have equivalent solution in C#. Alignment.PointLocation and Alignment.StationOffet&amp;nbsp;give the wrong answer &amp;nbsp;if there is station equation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Noel&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 04:59:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/alignment-pointlocation-on-aligment-with-station-equations/m-p/7485778#M12731</guid>
      <dc:creator>NoelRico</dc:creator>
      <dc:date>2017-10-24T04:59:47Z</dc:date>
    </item>
  </channel>
</rss>

