AddSearchPath

Adds a new path to Rhino's search path list. Search path items can be added manually by using Rhino's Options command and modifying the contents of the Files tab. See "Options Files settings" in the Rhino help file for more details.

Syntax

rhinoscriptsyntax.AddSearchPath( folder, index=-1 )

rhinoscript.application.AddSearchPath( folder, index=-1 )

Parameters

folder

Required.  String.  A valid folder, or path, to add.

index

Optional.  Number.  A zero-based position index in the search path list to insert the string. If omitted, the path will be appended to the end of the search path list.

Returns

Number

The zero-based index of the new search path item. If the index is less than zero, then the path item was not added to the search path list.

Example

import rhinoscriptsyntax as rs

rs.AddSearchPath("C:\\My Python Scripts")

Also See

DeleteSearchPath

SearchPathCount

SearchPathList