Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

launch([directory=string], [movie=string], [pdfFile=string], [webPage=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

launch is undoable, NOT queryable, and NOT editable.

Launch the appropriate application to open the document, web page or directory specified.

Return value

None

Flags

directory, movie, pdfFile, webPage
Long name (short name) Argument types Properties
directory(dir) string create
A directory.
movie(mov) string create
A movie file. The only acceptable movie file formats are MPEG, Quicktime, and Windows Media file. The file's name must end with .mpg, .mpeg, .mp4, .wmv, .mov, or .qt.
pdfFile(pdf) string create
A PDF (Portable Document Format) document. The file's name must end with .pdf.
webPage(web) string create
A web page.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

#launch a web browser to open webpage http://www.autodesk.com
cmds.launch(web="http://www.autodesk.com")