Get unused name

From PyMOLWiki
Revision as of 10:26, 18 August 2011 by Speleo3 (talk | contribs) (Created page with "'''get_unused_name''' is an API only function that returns a new object name. ''New in PyMOL version 1.2'' == PyMOL API == <source lang="python"> cmd.get_unused_name(string pr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

get_unused_name is an API only function that returns a new object name.

New in PyMOL version 1.2

PyMOL API

cmd.get_unused_name(string prefix='tmp', int alwaysnumber=1)

Example

This will create objects "tmp01", "tmp02", "tmp03":

cmd.create(cmd.get_unused_name(), 'none')
cmd.create(cmd.get_unused_name(), 'none')
cmd.create(cmd.get_unused_name(), 'none')

See also