This is a read-only mirror of pymolwiki.org

Difference between revisions of "Get unused name"

From PyMOL Wiki
Jump to navigation Jump to search
(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...")
 
m (2 revisions)
 
(One intermediate revision by one other user not shown)
Line 22: Line 22:
  
 
* [[get_legal_name]]
 
* [[get_legal_name]]
 +
* [[get_object_list]]
 +
* [[get_names]]

Latest revision as of 01:46, 28 March 2014

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