Manages components and document-wide properties.
Properties
Boolean Active
Returns True if the document is the active document displayed by the Manifold user interface, and False otherwise. Read only.
Application Application
Returns application. Read only.
String Author
Sets or returns document author. Read/write.
Boolean BatchUpdates
Sets or returns batch update mode. When batch mode is on, changes made by script are not immediately propagated to the mapfile, which is faster but can make script objects report outdated information. The recommended technique is to turn BatchUpdates on when changing large bulks of data and turn it back off when all necessary changes have been done. Read/write.
String Comments
Sets or returns comments associated with document. Read/write.
ComponentSet ComponentSet
Returns set of document components. Read only.
String FullName
Returns fully qualified filename of a document. Returns empty string for newly created documents. Read only.
String Keywords
Sets or returns list of keywords associated with document. Read/write.
String Name
Returns document name. Read only.
Any Parent
Returns parent object. Read only.
String Path
Returns path to the document file. Read only.
Boolean ReadOnly
Returns True if document is opened in read only mode and False otherwise. Read only.
Boolean Saved
Returns True if document has been saved after the latest modifications and False otherwise. Read only.
String Subject
Sets or returns subject associated with document. Read/write.
String Title
Sets or returns document title. Read/write.
Methods
CheckIn(ComponentSet components)
Checks in changes made to shared components to the Enterprise server or servers in Enterprise Edition.
CheckInAll()
Checks in changes made to all shared components in the document to the Enterprise server or servers in Enterprise Edition.
CheckOut(ComponentSet components)
Checks out shared components for editing in Enterprise Edition.
CheckOutAll()
Checks out all shared components in the document for editing in Enterprise Edition.
Close(Boolean saveChanges)
Closes document saving or discarding changes. If argument is omitted, the changes are saved. If document contains running script the method fails.
Clear()
Removes all components excluding running script component and any components it depends on (tables, drawings, folders).
GetLatestVersion(ComponentSet components)
Gets the latest version of shared components from the Enterprise server or servers in Enterprise Edition.
GetLatestVersionAll()
Gets the latest version of all shared components in the document from the Enterprise server or servers in Enterprise Edition.
Analyzer NewAnalyzer()
Creates new analyzer object.
Chart NewChart(String name, Table table, Boolean exactName)
Creates new chart component for given table. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Comments NewComments(String name, Boolean exactName)
Creates new comments component. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
ComponentSet NewComponentSet()
Creates new component set object for later use in NewMap and similar methods.
DataSource NewDataSource()
Creates a new data source for exporting or importing data.
Drawing NewDrawing(String name, CoordinateSystem system, Boolean exactName)
Creates new drawing component. Coordinate system and exact name parameters are optional. When exact name is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Elevation NewElevation(String name, Profile profile, Boolean exactName)
Creates new elevation component for given profile. Exact name parameter is optional. When it is set to False or omitted, the system adjusts the name so that there are no collisions with existing components.
Export NewExport(String name)
Creates new exporter using exporter name.
Folder NewFolder(String name, Boolean exactName)
Creates new folder component. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Form NewForm(String name, Boolean exactName)
Creates new form component. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Image NewImage(String name, Number width, Number height, ImageType type, CoordinateSystem system, Boolean exactName)
Creates new image component. Width, height, type, coordinate system and exact name parameters are optional. When exact name is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Import NewImport(String name)
Creates new importer using importer name.
Labels NewLabels(String name, CoordinateSystem system, Boolean exactName)
Creates new labels component. Coordinate system and exact name parameters are optional. When exact name is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Labels NewLabels(String name, Drawing drawing, Boolean exactName, Boolean populate)
Creates new labels component linked to given drawing. The last two parameters are optional. When the exact name parameter is set to False or omitted, the system adjusts the name so that there are no collisions with existing components. When the populate parameter is set to True, the system automatically populates the labels component with a label for each drawing object.
Layer NewLayer(Component component, Number opacity)
Creates new layer with given component. Opacity parameter is optional and can vary from 100 (opaque) to 0 (transparent).
Layout NewLayout(String name, Component component, Boolean exactName, String template)
Creates new layout component. Component, exact name and template parameters are optional. When exact name is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Map NewMap(String name, Component layer, CoordinateSystem system, Boolean exactName)
Map NewMap(String name, ComponentSet layers, CoordinateSystem system, Boolean exactName)
Creates new map component. Coordinate system and exact name parameters are optional.
ObjectSet NewObjectSet(Object content)
ObjectSet NewObjectSet(ObjectSet content)
Creates new static object set with given content. Content parameter is optional.
Palette NewPalette(String name, Boolean exactName)
Creates new palette component. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Profile NewProfile(String name, Surface surface, Branch metric, Boolean exactName)
Profile NewProfile(String name, Surface surface, BranchSet metric, Boolean exactName)
Profile NewProfile(String name, Surface surface, Geom metric, Boolean exactName)
Profile NewProfile(String name, Surface surface, PointSet metric, Boolean exactName)
Creates new profile component for given surface. Metric parameter is optional. Exact name parameter is optional. When it is set to False or omitted, the system adjusts the name so that there are no collisions with existing components.
Query NewQuery(String name, Boolean exactName)
Creates new query component. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Script NewScript(String name, Boolean exactName)
Creates new script component. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Surface NewSurface(String name, Number width, Number height, ValueType type, CoordinateSystem system, Boolean exactName)
Creates new surface component. Width, height, type, coordinate system and exact name parameters are optional. When exact name is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Table NewTable(String name, ColumnSet columns, Boolean exactName)
Creates new table component. Column set and exact name parameters are optional. When exact name is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Terrain NewTerrain(String name, Surface surface, Boolean exactName)
Creates new terrain component for given surface. Exact name parameter is optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Theme NewTheme(String name, Component parent, Boolean exactName)
Creates new theme component linked to given drawing or theme. Exact name parameter is optional. When it is set to False or omitted, the system adjusts the name so that there are no collisions with existing components.
Zones NewZones(String name, CoordinateSystem system, Boolean exactName)
Creates new zones component. Coordinate system and exact name parameters are optional. When it is set to False or omited, the system adjusts the name so that there are no collisions with existing components.
Open(String fileName, Boolean saveChanges, Boolean readOnly)
Opens new document saving or discarding any pending changes.
Paste()
Pastes the contents of the Clipboard as new component.
PasteAs(ComponentType type)
Pastes the contents of the Clipboard as new component of the desired type.
RefreshAllLinked()
Refreshes all linked components.
RevertToSaved()
Reverts documents to last saved state if any.
Save()
Saves document.
SaveAs(String fileName)
Saves document with a new name.
UndoCheckOut(ComponentSet components)
Undoes changes made to shared components and gets the latest version of the components from the Enterprise server or servers in Enterprise Edition.
UndoCheckOutAll()
Undoes changes made to all shared components in the document and gets the latest version of the components from the Enterprise server or servers in Enterprise Edition.
Tech Note
Prior to 6.50 SP1, the BatchUpdates property applied only to the active document (so, there was no method to increase performance by batching updates in an external application or on a web site) and was global in that all instances of the Document object referring to the MAP file opened in the UI were sharing the value of the property. As of 6.50 SP1, the BatchUpdates property works for all documents and is scoped to a particular document object.
That is,
Application.ActiveDocument.BatchUpdates = Xxx
...sets the property in a temporary instance of the Document object, which does not have any effect.
However,
Set doc = Application.ActiveDocument
doc.BatchUpdates = True
...
... ' use data obtained from the "doc" object ...
...batches updates for all write operations in all objects retrieved from the "doc" object.
The new policy is both faster and more flexible.
Obtained From
Application (NewDocument, ActiveDocument)
Chart (Document)
Comments (Document)
Component (Document)
ComponentSet (Document)
DocumentSet (Item)
Drawing (Document)
Elevation (Document)
Folder (Document)
Form (Document)
Image (Document)
Labels (Document)
Layout (Document)
Map (Document)
Palette (Document)
Profile (Document)
Query (Document)
Script (Document)
Surface (Document)
Table (Document)
Terrain (Document)
Zones (Document)
See Also