<?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 : integrate options into getpoint-function in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6464504#M35140</link>
    <description>&lt;P&gt;hi !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this was very nice and helpfull - but i have a Little additional question: how would you integrate a secound (third) Option like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Specify cloud starting point or [Arc length,option2,option3]:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards Jan&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2016 12:35:31 GMT</pubDate>
    <dc:creator>jan_tappenbeck</dc:creator>
    <dc:date>2016-07-28T12:35:31Z</dc:date>
    <item>
      <title>integrate options into getpoint-function</title>
      <link>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6463863#M35138</link>
      <description>&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in Lisp it is possible to add options into getpoint-function by initget and the []-text. code looks like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(initget "Arc")
  (setq LAST_PT (GetPoint "\nSpecify cloud starting point or [Arc length]: "))


  (if (= LAST_PT "Arc")
    (progn
      (initget 6)
      (setq TMP (getdist (strcat "\nSpecify arc length &amp;lt;" (rtos ARC_DIST 2 3) "&amp;gt;: ")))
      (if TMP
        (Progn
          (setq ARC_DIST TMP)
          (setenv "AC_Bonus_Revcloud_Bulge" (rtos (/ ARC_DIST DIM_SCALE) 2))
        )
      )
      (setq LAST_PT (getpoint "\nSpecify cloud start point: "))
    ) ;;end STR "RADIUS" test
  )&lt;/PRE&gt;&lt;P&gt;now i want to make this in vb. net - but i did not found code!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could somebody help to me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reagards Jan&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 05:52:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6463863#M35138</guid>
      <dc:creator>jan_tappenbeck</dc:creator>
      <dc:date>2016-07-28T05:52:29Z</dc:date>
    </item>
    <item>
      <title>Re : integrate options into getpoint-function</title>
      <link>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6463968#M35139</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a C# equivalent.&lt;/P&gt;
&lt;P&gt;You should be able to easily convert it to VB, but if you're starting with .NET, you'd rather learn C#...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var ppo = new PromptPointOptions("\nSpecify cloud starting point or [Arc length]: ", "Arc");
var ppr = ed.GetPoint(ppo);
if (ppr.Status == PromptStatus.Keyword)
{
    var pdo = new PromptDistanceOptions("\nSpecify arc length: ");
    pdo.AllowNegative = false;
    pdo.AllowZero = false;
    pdo.DefaultValue = arcDist;
    var pdr = ed.GetDistance(pdo);
    if (pdr.Status == PromptStatus.OK)
        arcDist = pdr.Value;
    ppr = ed.GetPoint("\nSpecify cloud starting point: ");
    if (ppr.Status != PromptStatus.OK)
        return;
}
if (ppr.Status != PromptStatus.OK)
    return;
var lastPoint = ppr.Value;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 07:17:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6463968#M35139</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-07-28T07:17:04Z</dc:date>
    </item>
    <item>
      <title>Re : integrate options into getpoint-function</title>
      <link>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6464504#M35140</link>
      <description>&lt;P&gt;hi !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this was very nice and helpfull - but i have a Little additional question: how would you integrate a secound (third) Option like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Specify cloud starting point or [Arc length,option2,option3]:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards Jan&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 12:35:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6464504#M35140</guid>
      <dc:creator>jan_tappenbeck</dc:creator>
      <dc:date>2016-07-28T12:35:31Z</dc:date>
    </item>
    <item>
      <title>Re : integrate options into getpoint-function</title>
      <link>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6464584#M35141</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just add the options in the PromptPointOptions parameters and then, you can loop while prompt result status is Keyword and check for the prompt result StringResult value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;            // set message and keywords
            var ppo = new PromptPointOptions(
                "\nSpecify cloud starting point or [Arc length/Second option/Third option]: ", // message
                "Arc Second Third"); // keywords
            Point3d lastPoint;
            // loop while PromptResult.Status is Keyword
            while (true)
            {
                var ppr = ed.GetPoint(ppo);
                // user choosed an option
                if (ppr.Status == PromptStatus.Keyword)
                {
                    switch (ppr.StringResult)
                    {
                        case "Arc":
                            var pdo = new PromptDistanceOptions("\nSpecify arc length: ");
                            pdo.AllowNegative = false;
                            pdo.AllowZero = false;
                            pdo.DefaultValue = arcDist;
                            var pdr = ed.GetDistance(pdo);
                            if (pdr.Status == PromptStatus.OK)
                                arcDist = pdr.Value;
                            break;
                        case "Second":
                            // do what you have to do with "Second" option here
                            break;
                        case "Third":
                            // do what you have to do with "Third" option here
                            break;
                    }
                }
                // user specified a point
                else if (ppr.Status == PromptStatus.OK)
                {
                    lastPoint = ppr.Value;
                    break; // exit the loop
                }
                // user cancelled
                else
                {
                    return;
                }
            }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VB conversion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;            ' set message and keywords
            Dim ppo As PromptPointOptions =
                New PromptPointOptions(vbLf &amp;amp; "Specify cloud starting point or [Arc length/ Second option/Third option]: ", "Arc Second Third")
            Dim lastPoint As Point3d
            ' loop while PromptResult.Status is Keyword
            While True
                Dim ppr As PromptPointResult = ed.GetPoint(ppo)
                If ppr.Status = PromptStatus.Keyword Then 'user choosed an option
                    Select Case ppr.StringResult
                        Case "Arc"
                            Dim pdo As PromptDistanceOptions = New PromptDistanceOptions(vbLf &amp;amp; "Specify arc length: ")
                            pdo.AllowNegative = False
                            pdo.AllowZero = False
                            pdo.DefaultValue = arcDist
                            Dim pdr As PromptDoubleResult = ed.GetDistance(pdo)
                            If pdr.Status = PromptStatus.OK Then
                                arcDist = pdr.Value
                            End If
                            Exit Select
                        Case "Second"
                            ' do what you have to do with "Second" option here
                            Exit Select
                        Case "Third"
                            ' do what you have to do with "Third" option here
                            Exit Select
                    End Select
                ElseIf ppr.Status = PromptStatus.OK Then 'user specified a point
                    lastPoint = ppr.Value
                    Exit While 'exit the loop
                Else 'user cancelled
                    Return
                End If
            End While&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 13:32:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/6464584#M35141</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-07-28T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re : integrate options into getpoint-function</title>
      <link>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/9784144#M35142</link>
      <description>&lt;P&gt;I keep forgetting about&lt;/P&gt;&lt;LI-CODE lang="general"&gt;While (true)&lt;/LI-CODE&gt;&lt;P&gt;thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also a really good example for how to implement a simple "option" based command using c#&lt;/P&gt;&lt;P&gt;in for anyone is unsure what this means... it means "loop forever" so make sure you have all your exits covered!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 11:02:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/integrate-options-into-getpoint-function/m-p/9784144#M35142</guid>
      <dc:creator>ceethreedee.com</dc:creator>
      <dc:date>2020-10-05T11:02:33Z</dc:date>
    </item>
  </channel>
</rss>

