Hi,
Is it possible to use this property to set the default template from a plugin on_load?
Could I get an example of this?
Hi,
Is it possible to use this property to set the default template from a plugin on_load?
Could I get an example of this?
Hi @CassieConti,
Yes it is.
Perhaps something like this?
protected override LoadReturnCode OnLoad(ref string message)
{
var pluginLocation = Assembly.GetExecutingAssembly().Location;
var pluginFolder = Path.GetDirectoryName(pluginLocation);
var pluginTemplate = Path.Combine(pluginFolder, "MyTemplateFile.3dm");
if (File.Exists(pluginTemplate))
{
var rhinoTemplate = Rhino.ApplicationSettings.FileSettings.TemplateFile;
if (!rhinoTemplate.Equals(pluginTemplate))
Rhino.ApplicationSettings.FileSettings.TemplateFile = pluginTemplate;
}
return LoadReturnCode.Success;
}
– Dale
Hi @dale,
Works great on its own, but how can I can’t figure out how to combine it with your .RUI
replacement script?
is it also possible to add display modes and aliases from the plugin?