I start my first and very simple plug and I got that into Rhino
I have W8 x64, VS 2012 and latest Rhino V5 x64
Commande: _AutomateRender
The AutomateRender command will add a line right now.
Commande: _Line
Commande: _Zoom
Dessiner une fenêtre pour zoomer ( Toutes Dynamique Étendu Facteur Avant Arrière Sélection Cible 1Sur1 ): _Extents
I don’t see the coordinate of the line which should be drawed in the command line and nothing is created into the scene !?!
Any help?
using System;
using System.Collections.Generic;
using Rhino;
using Rhino.Commands;
using Rhino.Geometry;
using Rhino.Input;
using Rhino.Input.Custom;
namespace AutomateRender
{
[System.Runtime.InteropServices.Guid("397c386a-ba54-431e-97e6-88da0b43de42")]
public class AutomateRenderCommand : Rhino.Commands.Command
{
public AutomateRenderCommand()
{
// Rhino only creates one instance of each command class defined in a
// plug-in, so it is safe to store a refence in a static property.
Instance = this;
}
///<summary>The only instance of this command.</summary>
public static AutomateRenderCommand Instance
{
get;
private set;
}
///<returns>The command name as it appears on the Rhino command line.</returns>
public override string EnglishName
{
get { return "AutomateRender"; }
}
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
Rhino.RhinoApp.WriteLine("The {0} command will add a line right now.", EnglishName);
Rhino.RhinoApp.RunScript("_Line 0,0,0 10,10,10", true);
Rhino.RhinoApp.RunScript("_Zoom _Extents", true);
return Rhino.Commands.Result.Success;
}
}
}