Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:scriptsamples:seltext [2015/09/14] (current)
Line 1: Line 1:
 +====== How To: Select Text Objects ======
 +====== RhinoScript ======
 +> **Summary:​** //​Demonstrates how to use [[developer:​rhinoscript|RhinoScript]] to select all text objects.//
 +
 +The following example [[developer:​rhinoscript|RhinoScript]] code demonstrates how to select all text objects.
 +
 +
 +<code vb>
 + Sub SelText
 +   Dim arrObjects, strObject
 +   ​arrObjects = Rhino.AllObjects
 +   If IsArray(arrObjects) Then
 +     For Each strObject In arrObjects
 +       If Rhino.IsText(strObject) Then
 +         ​Rhino.SelectObject strObject
 +       End If
 +     Next
 +   End If
 + End Sub
 +
 +</​code>​
 +The following is the button macro version of the above subroutine.
 +
 +   ​_-NoEcho
 +   ​_-RunScript (
 +   ​arrObjects = Rhino.AllObjects
 +   If IsArray(arrObjects) Then
 +
 +<code vb>
 + For Each strObject In arrObjects
 + If Rhino.IsText(strObject) Then Rhino.SelectObject strObject
 + Next
 + End If
 + ​strObject = vbNull
 + ​arrObjects = vbNull
 + )
 +
 +</​code>​
 +
 +
 +{{tag>​Developer RhinoScript}}
  
developer/scriptsamples/seltext.txt ยท Last modified: 2015/09/14 (external edit)