<?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: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4482731#M19572</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this issue resolved through this &lt;A href="http://wikihelp.autodesk.com/AutoCAD_Civil_3D/enu/2014/Help/API_Developer's_Guide/0059-Alignmen59/0064-Stations64/0069-Superele69" target="_blank"&gt;link&lt;/A&gt; ?&lt;/P&gt;
&lt;P&gt;Do you need any further help ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2013 10:09:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-10-03T10:09:58Z</dc:date>
    <item>
      <title>C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/3559682#M19565</link>
      <description>&lt;P&gt;I'm having an issue in attempting to get the slope at a station&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Executing this line of code&lt;/P&gt;&lt;P&gt;&lt;EM&gt;nsLeftIn_End = mySuperStn.GetSlope(Autodesk.Civil.Land.SuperelevationCrossSegmentType.LeftInShoulderCrossSlope)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the function below throws an execption:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operation is not valid due to the current state of the object.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've stripped down the function to show where the error is happening. I verifiied that the execption is still thrown in this version of the function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't for the life of me figure out what is wrong with the state of the object that won't allow for getting the slope value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions appreciated.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; Function ModifySuper(ByRef myAlg As Alignment) As Boolean
        Dim nsLeftIn_End As Double
        Dim nsLeftOut_End As Double
        Dim nsRightIn_End As Double
        Dim nsRightOut_End As Double

        Dim mySuperCol As SuperelevationCriticalStationCollection
        Dim mySuperStn As SuperelevationCriticalStation

        ModifySuper = False
        Try
            If IsNothing(myAlg) Then
                MsgBox("Cannot locate alignment in ModifySuper ", vbExclamation)
                Exit Function
            End If

            mySuperCol = myAlg.SuperelevationCriticalStations
            For Each mySuperStn In mySuperCol
                Select Case mySuperStn.StationType
                    Case Autodesk.Civil.Land.SuperelevationCriticalStationType.BeginAlignment

                    Case Autodesk.Civil.Land.SuperelevationCriticalStationType.EndAlignment

                    Case Autodesk.Civil.Land.SuperelevationCriticalStationType.BeginNormalCrown

                    Case Autodesk.Civil.Land.SuperelevationCriticalStationType.EndNormalCrown

                    Case Autodesk.Civil.Land.SuperelevationCriticalStationType.EndNormalShoulder
                        Try
                           &lt;STRONG&gt; nsLeftIn_End = mySuperStn.GetSlope(Autodesk.Civil.Land.SuperelevationCrossSegmentType.LeftInShoulderCrossSlope)&lt;/STRONG&gt;
                            nsLeftOut_End = mySuperStn.GetSlope(Autodesk.Civil.Land.SuperelevationCrossSegmentType.LeftOutShoulderCrossSlope)
                            nsRightIn_End = mySuperStn.GetSlope(Autodesk.Civil.Land.SuperelevationCrossSegmentType.RightInShoulderCrossSlope)
                            nsRightOut_End = mySuperStn.GetSlope(Autodesk.Civil.Land.SuperelevationCrossSegmentType.RightOutShoulderCrossSlope)

                        Catch ex As Exception
                            MsgBox("Exception: " &amp;amp; ex.Message)
                        End Try

                    Case Autodesk.Civil.Land.SuperelevationCriticalStationType.LevelCrown
                End Select

            Next

            ModifySuper = True

        Catch ex As Exception
            MsgBox("Execption: " &amp;amp; ex.Message)
        End Try
    End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2012 16:16:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/3559682#M19565</guid>
      <dc:creator>RodWing</dc:creator>
      <dc:date>2012-07-31T16:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/3564324#M19566</link>
      <description>&lt;P&gt;Hi RodWing,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you check in the UI dialog if there is a valid value set for &lt;STRONG&gt;LeftInShoulderCrossSlope&lt;/STRONG&gt; at that &lt;STRONG&gt;station&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can take a look at the following Blog post and check the screenshot I used there to understand which UI window I am referring here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/infrastructure/2012/06/want-to-add-a-superelevationcriticalstation-using-civil-3d-net-api-.html" target="_blank"&gt;http://adndevblog.typepad.com/infrastructure/2012/06/want-to-add-a-superelevationcriticalstation-using-civil-3d-net-api-.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2012 10:50:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/3564324#M19566</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-03T10:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4427125#M19567</link>
      <description>&lt;P&gt;This problem appears when exists two default criticalstation that you can´t delete.&lt;/P&gt;&lt;P&gt;These criticalstations are the start alignment and the end alignment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exception: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Condition:&lt;/P&gt;&lt;TABLE cellpadding="5" cellspacing="2"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;System&lt;SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;ArgumentOutOfRangeException&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Thrown when index is out of the collecton range.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;System&lt;SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;InvalidOperationException&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;Thrown when the criticalStationType is BeingAlignment or EndAlignment.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 14 Sep 2013 17:40:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4427125#M19567</guid>
      <dc:creator>joantopo</dc:creator>
      <dc:date>2013-09-14T17:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4427137#M19568</link>
      <description>&lt;P&gt;And this exception can be too:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2012/05/adding-or-modifying-the-database-from-modeless-dialog-box.html"&gt;http://adndevblog.typepad.com/autocad/2012/05/adding-or-modifying-the-database-from-modeless-dialog-box.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to "Lock" the database before write it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2013 17:35:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4427137#M19568</guid>
      <dc:creator>joantopo</dc:creator>
      <dc:date>2013-09-14T17:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4427291#M19569</link>
      <description>&lt;PRE&gt;For Each mySuperStn In mySuperCol

If mySuperStn.Station = myAlg.StartingStation OrElse mySuperStn.Station = myAlg.EndingStation Then

//nothing 


Else

Select case....

End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2013 18:06:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4427291#M19569</guid>
      <dc:creator>joantopo</dc:creator>
      <dc:date>2013-09-14T18:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4429161#M19570</link>
      <description>&lt;P&gt;This is the solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to write code of each Segment &amp;nbsp;Type using "Try", because maybe doesn´t exist that segment &amp;nbsp;type (however, left outside lane and right outside lane always exist). You can use boolean variables.(In catch method bool variable=false)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And you have to know if a Segment type exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had the same problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that It should exist in the API (superelevationCriticalStation Class) the booleans properties&amp;nbsp;&lt;/P&gt;&lt;P&gt;IsSegmentTypeLeftInShoulderCrossSlope, IsSegmentTypeLeftinLaneCrossSlope,...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excuse me because I &amp;nbsp;have remixed &amp;nbsp;C# code and &amp;nbsp;Visual Basic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;bool LeftInShoulderCrossSl0pe&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try &lt;/SPAN&gt;&lt;STRONG&gt; nsLeftIn_End = mySuperStn.GetSlope(Autodesk.Civil.Land.SuperelevationCrossSegmentType.LeftInShoulderCrossSlope)&lt;BR /&gt;&lt;BR /&gt;LeftInShoulderCrossSlope=true&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;end try&lt;BR /&gt;&lt;BR /&gt;catch&lt;BR /&gt;&lt;BR /&gt;LeftInShoulderCrossSlpe=false&lt;BR /&gt;&lt;BR /&gt;end catch&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Sep 2013 11:44:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4429161#M19570</guid>
      <dc:creator>joantopo</dc:creator>
      <dc:date>2013-09-16T11:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4468873#M19571</link>
      <description>&lt;P&gt;This is the exactly same sample.&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://wikihelp.autodesk.com/AutoCAD_Civil_3D/enu/2014/Help/API_Developer's_Guide/0059-Alignmen59/0064-Stations64/0069-Superele69"&gt;http://wikihelp.autodesk.com/AutoCAD_Civil_3D/enu/2014/Help/API_Developer's_Guide/0059-Alignmen59/0064-Stations64/0069-Superele69&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2013 16:31:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4468873#M19571</guid>
      <dc:creator>joantopo</dc:creator>
      <dc:date>2013-09-29T16:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4482731#M19572</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this issue resolved through this &lt;A href="http://wikihelp.autodesk.com/AutoCAD_Civil_3D/enu/2014/Help/API_Developer's_Guide/0059-Alignmen59/0064-Stations64/0069-Superele69" target="_blank"&gt;link&lt;/A&gt; ?&lt;/P&gt;
&lt;P&gt;Do you need any further help ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2013 10:09:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4482731#M19572</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-03T10:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: C3D 2012 SuperelevationCriticalStation.GetSlope VB.Net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4483251#M19573</link>
      <description>&lt;P&gt;No. Thank you.&lt;/P&gt;&lt;P&gt;I was only adding more information.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2013 11:36:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/c3d-2012-superelevationcriticalstation-getslope-vb-net/m-p/4483251#M19573</guid>
      <dc:creator>joantopo</dc:creator>
      <dc:date>2013-10-03T11:36:51Z</dc:date>
    </item>
  </channel>
</rss>

