Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5838

GetNumber() with toggle option like Circle radius/diameter

$
0
0

@Helvetosaur wrote:

Hi all,

Looking for a smaple of how to program RhinoCommon GetNumber with a single toggle option like the Rhino command Circle has for Diameter./Radius. I know how to do this with AddOptionToggle, but it doesn't qork quite the same way with the command-line prompts - which is what I want to figure out.

The Rhino command looks like this:

Radius <10.000> ( Diameter ...) (there are other toggles)

if you hit the "Diameter" link, it changes to "Radius", the prompt changes to "Diameter", and the default number doubles:

Diameter <20.000> ( Radius...)

With what I can program currently - according to various samples here and there - I always end up having something like this:

Current Value <10.000> (Value=Diameter)

The "Current Value" prompt doesn't change and I always have the toggle that reads Value=Diameter (or Radius), whereas I would like to just have "Diameter" or "Radius" without the "Something=" part.

Thanks, --Mitch

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5838

Latest Images

Trending Articles



Latest Images