top of page
  • Writer's pictureDavid Mans

Incremental Counter

💻 Rhino 5

🔼 Rhino Script

🛠️ Visual Basic

 

A tool developed to expedite fabrication. Each click adds text which counts by a specified increment allowing for quick numbering, with your choice of prefixes.

 
Option Explicit 
'Script written by <David Mans> 
'Script copyrighted by <Neoarchaic Design> 
'Script version Thursday, June 26, 2008 9:54:36 PM 
Call Main() 
Sub Main() 
    Call sequential() 
End Sub
Function sequential() 
    sequential = Null 
    Dim pt 
    Dim pre, strt, incr, i 
    pre = Rhino.GetString("Enter Prefix", "", array("")) 
    If pre <> "" Then
        pre = pre &amp; "_"
    End If
    strt = Rhino.GetReal("count from = ", 0) 
    If isNull(strt) Then  Exit Function
    incr = Rhino.GetReal("increment = ", 1) 
    If isNull(incr) Then Exit Function
    i = strt 
    Do
        pt = Rhino.GetPoint("press enter to finish") 
        If isNull(pt) Then Exit Function
        Call Rhino.AddText(pre &amp; i, pt) 
        i = i + incr 
    Loop
End Function
 


0 views

Recent Posts

See All
bottom of page