Noos
April 14, 2019, 3:22pm
1
Good morning.
I need to call RunScript like
RhinoApp.RunScript(string.Format("_-Open \"{0}\" _Enter", filename), false);
but not from Rhino Command, rather from any part of the plugin code.
Simple command call not work of course, but I think the command style attribute is specific for Rhino Command definition.
How can I make the call work?
rgr
April 15, 2019, 5:48am
2
Have you tried calling it?
Once the command you are running has the attribute, you can call it from anywhere inside your code.
Noos
April 15, 2019, 3:23pm
3
If I try to call it from an event, I don’t have any error, but the command don’t run.
private void CodeDocumentDataGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
{
Rhino.RhinoApp.RunScript(string.Format("_-Save \"{0}\" _Enter",
CodeDocumentDataGridView.SelectedRows[0].Cells[0].Value.ToString()), false);
}
dale
(Dale Fugier)
April 16, 2019, 10:38pm
4
Hi @Noos ,
There is no reason that RunScript
shouldn’t run from a WinForms control event.
For more assisting, you might consider posting a sample project that isn’t working for you.
– Dale