forked from mcneel/rhino-developer-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DumpDocumentData.rvb
32 lines (28 loc) · 1.07 KB
/
DumpDocumentData.rvb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' DumpDocumentData.rvb -- May 2012
' If this code works, it was written by Dale Fugier.
' If not, I don't know who wrote it.
' Works with Rhino 4.0.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Subroutine: DumpDocumentData
' Purpose: Lists all RhinoScript document data to the command line.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub DumpDocumentData
Dim arrApps, strApp, arrKeys, strKey, strValue
arrApps = Rhino.GetDocumentData()
If IsArray(arrApps) Then
For Each strApp In arrApps
arrKeys = Rhino.GetDocumentData(strApp)
If IsArray(arrKeys) Then
For Each strKey In arrKeys
strValue = Rhino.GetDocumentData(strApp, strKey)
If Not IsNull(strValue) Then
Rhino.Print strApp & " - " & strKey & " - " & strValue
End If
Next
End If
Next
End If
End Sub