McNeel Wiki
Command Prompt Window Moves when Setting Language
edit · print · help · all topics
Main Pages

AccuRender

Bongo

Brazil r/s

Developer

Flamingo

Penguin

Rhino Blogs

Rhino

Search

Languages

Česky

Deutsch

English

Español

Français

Italiano

Polish

日本語

한국어

中文(繁體)

 
.
DeveloperC++,.NET
VersionRhino 4

Question

I’m trying to change the language of Rhino by code:

  Dim settings As MRhinoAppSettings = RhUtil.RhinoApp.AppSettings
  Dim appearance As IRhinoAppAppearanceSettings = settings.AppearanceSettings()
  Dim appearance2 As New MRhinoAppAppearanceSettings(appearance)
  appearance2.m_language_identifier = id_lang
  settings.SetAppearanceSettings(appearance2)

This code works, but it change the position of the command prompt. When I have it on the botton, change it to the top. Do you know why?

Answer

When making a copy if Rhino's CRhinoAppAppearanceSettings object, in order to make changes, make sure the sync_with_ui argument is set to True when calling CRhinoAppSettings::AppearanceSettings. The following examples demonstrate this:

C++

  CRhinoCommand::result CCommandTest::RunCommand( const CRhinoCommandContext& context )
  {
    CRhinoAppSettings& settings = RhinoApp().AppSettings();
    CRhinoAppAppearanceSettings appearance = settings.AppearanceSettings(true);
    appearance.m_language_identifier = 1034; // Spanish
    settings.SetAppearanceSettings(appearance);
    return CRhinoCommand::success;
  }

C#

  public override IRhinoCommand.result RunCommand(IRhinoCommandContext context)
  {
    MRhinoAppSettings settings = RhUtil.RhinoApp().AppSettings();
    MRhinoAppAppearanceSettings appearance = new MRhinoAppAppearanceSettings(settings.AppearanceSettings(true));
    appearance.m_language_identifier = 1034; // Spanish
    settings.SetAppearanceSettings(appearance);
    return IRhinoCommand.result.success;
   }
rename · changes · history · subscriptions · lost and found · references · file upload