Displays a dialog box prompting the user to select a layer.
Rhino.GetLayer ([strTitle [, strLayer [, blnShowNewLayer [, blnShowSetCurrent]]]])
strTitle |
Optional. String. A dialog box title. |
strLayer |
Optional. String. The name of a layer to pre-select. If omitted, the current layer will be pre-selected. |
blnShowNewLayer |
Optional. Boolean. Display the "New" layer button. If omitted, the button is not displayed. |
blnShowSetCurrent |
Optional. Boolean. Display the "Set layer current" check box. If omitted, the check box is not displayed. |
String |
The name of the selected layer if successful. |
Null |
If not successful, or on error. |
Dim strObject, strLayer
strObject = Rhino.GetObject("Select object")
If Not IsNull(strObject) Then
strLayer = Rhino.GetLayer("Select Layer", Rhino.ObjectLayer(strObject, True, True)
If Not IsNull(strLayer) Then
Rhino.ObjectLayer strObject, strLayer
End If
End If