Site Tools


Locating Rhino's Linetype File

Developer: .NET
Summary: Demonstrates how to locate Rhino's default linetype file.

Question

Is there a way to get the path and filename of the Rhino's language-specific default linetype file?

Answer

Yes, see the following example.

C#

public override IRhinoCommand.result RunCommand(IRhinoCommandContext context)
{
  MRhinoProfileContext pc = RhUtil.RhinoApp().GetRhinoProfileContext(
    IRhinoProfileContext.context_location.cl_build_date_local_machine
    );
 
  uint lcid = RhUtil.RhinoApp().AppSettings().AppearanceSettings().m_language_identifier;
  if (0 == lcid)
    lcid = 1033;
 
  string section = string.Format("{0}", lcid);
  string entry = "Default Linetype List";
  string value = "";
  pc.LoadProfileString(section, entry, ref value);
 
  RhUtil.RhinoApp().Print(string.Format("{0} = {1}\n", entry, value));
 
  return IRhinoCommand.result.success;
}


developer/linetypefile.txt ยท Last modified: 2015/09/14 (external edit)