Celestia/Celx Scripting/CELX Lua Methods/CEL command deleteview

From Wikibooks, open books for an open world
Jump to navigation Jump to search

deleteview[edit | edit source]

deleteview { view <viewnumber> }

Delete the view of the specified <viewnumber>.


  1. Using this command only makes sense if there is at least one Muliti view left. This command has no effect on a Single view.


view <viewnumber>
A number, identifying the view on the screen to be deleted. Default is 1.
Must be a valid identifier, regarding the number of views on the screen, otherwise no delete will be performed.

CELX equivalent:

Based on the observer:deleteview() method.

  • Get observer instance of the active view instance within a Multi view and delete is.
obs = celestia:getobserver()

-- OR --

  • Get observer instances of all views and delete the view with identifier <viewnumber>.
observers = celestia:getobservers()

Split the screen in 4 equal parts and delete view number 3 after 5 seconds.


splitview { view 1 type "V" position 0.5 }
splitview { view 1 type "H" position 0.5 }
splitview { view 2 type "H" position 0.5 }
wait { duration 5.0 }
deleteview { view 3 }


obs = celestia:getobserver()
obs:splitview("V", 0.5)
observers = celestia:getobservers()
observers[1]:splitview("H", 0.5)
observers[2]:splitview("H", 0.5)
observers = celestia:getobservers()

Back to CEL command index