algorithmic modeling for Rhino
David,
Is there a class to call up the Document Properties? For example the definition file name? i.e. MyFile.gh
Or further the text that can be entered into the 'Description' section of the Definition under the Menu/Window/Document Properties? I can't seem to see it in the SDK documentation.
Something similar to the following that would return information about the current file:
Dim doc As RhinoDoc = RhinoDoc.ActiveDoc...
Thanks,
/m
Tags:
Hi Matthew,
something as simple as this will do:
GH_Document gd = owner.OnPingDocument();
A = gd.Properties.Description;
I hope this helps,
- Giulio
________________
giulio@mcneel.com
Versioning is not part of the GH_Document, but you can get both the build-date and the version through the Global_Proc module (I know, horrible name):
Grasshopper.Global_Proc.Version;
Grasshopper.Global_Proc.VersionString;
Grasshopper.Global_Proc.BuildDate;
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Edit: screw it, I just did change those. Methods, constants and properties that used to be in Grasshopper.Global_Proc are now divided into Grasshopper.Tracing, Grasshopper.Versioning and Grasshopper.Utility.
Unfortunately these are modules, not classes so method names will conflict between them, which means I cannot keep the old Global_Proc around and hide it from intellisense, which is the usual technique used to prevent SDK breaks.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
From C#, and in IL, vb.net modules are just sealed classes with static methods that are marked with Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute. So users will be able to pick them in C#. One alternative might be to create a look-alike class in Vb.Net?
- Giulio
________________
giulio@mcneel.com
You're right, since I'm breaking this anyway I might as well dump modules altogether and make something which is easier to modify later on without breaking.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
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