Hi,
New to Rhino and OpenNURBS.
I am trying to get the document strings that are displayed with GetDocumentUserText in the Rhino application as shown below.
Command: GetDocumentUserText
Document text key :
6 document user strings.
Description> This is a Rhino 3dm file.
DocNumber> 0001.
Stone> Diamond, Ruby.
ProductType> Ring.
FileName> TestAdept.3dm.
chkdockey> chkdoctext.
I am using the sample program Rhino3dmIO3dmFileDump as a starting point.
I can get user data for other objects but not the documentuserText
This works for getting user text I have added with the SetUserText
Rhino.FileIO.File3dm model = Rhino.FileIO.File3dm.Read(filename);
Rhino.FileIO.File3dmObjectTable ObjectTable = model.Objects;
foreach (Rhino.FileIO.File3dmObject File3Object in ObjectTable)
{
string objectName = File3Object.Name;
Rhino.DocObjects.ObjectAttributes ObjectAttr = File3Object.Attributes;
NameValueCollection NameValueCol = ObjectAttr.GetUserStrings();
string[] allkeys = NameValueCol.AllKeys;
int Count = NameValueCol.Count;
int i=0;
while (i<Count)
{
string keyvalue= NameValueCol.Get(i++);
}
}
So how do I get the document object so I can get the document user text?
This is for a stand alone application using openNURBS and not a PlugIn in Rhino
Thanks