algorithmic modeling for Rhino
object rr = Rhino.RhinoApp.GetPlugInObject("RhinoScript");
RhinoScript4.IRhinoScript rs = (RhinoScript4.IRhinoScript) rr;
rs.EnableRedraw(false);
rs.Command("print enter enter", false);
rs.EnableRedraw(true);
not working because i have to push the ok button
Tags:
Try prepending commands with a hyphen as it then surpresses dialogs.
ie. rs.Command("-print enter enter", false);
Rhino help on this topic below. I haven't tested this myself, but hope it helps.
Cheers,
Jon
-
(hyphen)
All commands are now scriptable at the command line (even commands that have dialog boxes by default). To suppress the dialog box and use command-line options, prefix the command name with a hyphen (-).
thanxs i think this helps....
Hi Michael,
in addition, these are two supported methods to call macros from .Net (C# and Vb.Net):
Using the Old .Net SDK:
Using RhinoCommon:
As Jon says, the - hyphenized versions of a command, where available, remove dialog boxes. The _ underscore allows to use the English version of command names also on localized systems.
Using the Microsoft-provided RhinoScript wrapper interface to call through .Net might work but it not recommended.
I hope this helps,
- Giulio
______________
giulio@mcneel.com//RhinoScript4.RhinoScriptClass test = new RhinoScript4.RhinoScriptClass();
Rhino.DocObjects.RhinoObject rh_obj = doc.Objects.Find(guuid_in);
object rr = Rhino.RhinoApp.GetPlugInObject("RhinoScript");
RhinoScript4.IRhinoScript rs = (RhinoScript4.IRhinoScript) rr;
rs.EnableRedraw(false);
rs.Command("_SelID " + guuid_in, true);
rs.Command("_Zoom _Selected");
rs.Command("_SelNone", true);
// rs.Command("!-print ", true);
rs.Command("-Zoom Factor 0.8", true);
rs.Command("Pan UP", true);
rs.EnableRedraw(true);
I need to print it to a file a i want to have a pdf binder
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by