-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFlamingoStuff.rvb
40 lines (37 loc) · 1.26 KB
/
FlamingoStuff.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
33
34
35
36
37
38
39
40
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' FlamingoStuff.rvb -- June 2004
' 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
Function FlamingoBuildNumber()
Dim objShell, strKey, strBuildNumber
Set objShell = CreateObject("WScript.Shell")
strKey = "HKEY_LOCAL_MACHINE\Software\McNeel\Flamingo\1.1\MostRecent"
On Error Resume Next
strBuildNumber = objShell.RegRead(strKey)
If Err.Number <> 0 Then
FlamingoBuildNumber = Null
Else
FlamingoBuildNumber = strBuildNumber
End If
Set objShell = Nothing
End Function
Function IsFlamingoInstalled()
IsFlamingoInstalled = vbFalse
Const rhRenderPlugin = 1
Dim arrPlugins, strPlugin
arrPlugins = Rhino.PlugIns(rhRenderPlugin)
If IsArray(arrPlugins) Then
For Each strPlugin In arrPlugins
If StrComp(strPlugIn, "Flamingo Raytrace 1.1", vbTextCompare) = 0 Then
IsFlamingoInstalled = vbTrue
Exit Function
ElseIf StrComp(strPlugIn, "Flamingo Photometric 1.1", vbTextCompare) = 0 Then
IsFlamingoInstalled = vbTrue
Exit Function
End If
Next
End If
End Function