Hi,
I have a .rvb code and it has dividing lines,
Do the dividers such as this do harm ? ‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
I struggle to know what of the initial description and author references are ok.
I recall in Internet page coding a way of inhibiting lines with a single character insert at line start.
to make usable for a button, bold I have added, italics I have deleted, inc the dividers after the )
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
’ ObjectNotes.rvb – May 2015
’ If this code works, it was written by Dale Fugier.
’ If not, I don’t know who wrote it.
’ Works with Rhino 5.
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
-_Runscript (
Option Explicit
Const STR_NOTES = “Notes”
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
’ Adds notes to an object
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
Call Main()
Sub Main()
Sub SetObjectNotes
Dim strObject, strOldNotes, strNewNotes
strObject = Rhino.GetObject(“Select object”, 0, True)
If IsNull(strObject) Then Exit Sub
strOldNotes = Rhino.GetUserText(strObject, STR_NOTES, False)
If IsNull(strOldNotes) Then strOldNotes = “”
strNewNotes = Rhino.EditBox(strOldNotes, “Edit object notes”, “Object Notes”)
If Not IsNull(strNewNotes) Then
Call Rhino.SetUserText(strObject, STR_NOTES, strNewNotes, False)
End If
End Sub
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
’ Deletes notes from objects
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
Sub DeleteObjectNotes
Dim arrObjects, strObject
arrObjects = Rhino.GetObjects(“Select objects”, 0, True, True)
If IsArray(arrObjects) Then
For Each strObject In arrObjects
Call Rhino.SetUserText(strObject, STR_NOTES, False)
Next
End If
End Sub
)
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
’ Drag & drop support
‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’‘’’
Rhino.AddStartUpScript Rhino.LastLoadedScriptFile
Call Rhino.AddAlias(“SetObjectNotes”, “_-RunScript (SetObjectNotes)”)
Call Rhino.AddAlias(“DeleteObjectNotes”, “_-RunScript (DeleteObjectNotes)”)
It says its for V5, can I cause instability by using codes for V5 in V7 and how do I tell which ones are safe to use ?
I dont want to mess up my V7 install that is taking a week what with hand editing all in properties.
I want to finish V7 then back up PC and move on.
Steve