Example on how to do Truth Value Checking.
Example on how to do Truth Value Checking
1import Editor
2import Vertex
3import VertexArray
4
5
8
9
10if docExists:
11 print( "Document exists." )
12
13
14if not nullDoc:
15 print( 'Document does not exist' )
16
17
19
20
21if not vertexArray:
22 print( 'The array is empty' )
23
24
26vertexArray.Insert( vertex )
27
28
29if vertexArray:
30 print( 'The array is not empty' )
31
32
33soundList = docExists.GetSoundList()
34soundList.AddSound( "someSound.mp3" )
35soundItem = soundList.GetSoundItem( 0 )
36
37
38if soundItem:
39 print( 'This SoundItem exists' )
40
41
42soundList.RemoveSound( soundItem )
43if not soundItem:
44 print( 'This SoundItem no longer exists' )
Document OpenDocument(String fileName)
Opens a new document and makes it the current document.
Document NewDocument(String filename="")
Creates a new document and makes it the current document.
VertexArray()
default ctor
Vertex()
Default constructor.