Click or drag to resize

Document Class

The Document class is the root for the currently loaded document.
Inheritance Hierarchy
SystemObject
  Demo3D.VisualsDocument

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 18.03.00
Syntax
C#
public class Document : IPackageTarget, IDisposable

The Document type exposes the following members.

Properties
  NameDescription
Public propertyApp
The application hosting the document.
Public propertyCameras
The collection of views in the model. This is a mapping of string names to Camera objects.
Public propertyConnections
Tag Server connections (if available).
Public propertyDefaultCamera
The name of the default View when loading or saving (looked up in Cameras).
Public propertyDocumentEdition
The edition that the document was last saved in.
Public propertyEventLogPath
Log events to this file, if null don't log events.
Public propertyEventQueue
The simulation dispatcher for scheduling asynchronous or future actions.
Public propertyExperiments
The collection of experiments in Sim3D that can be run in batch.
Public propertyIsExperimentRunning
Is an experiment currently running?
Public propertyIsResetting
Is the document currently being reset.
Public propertyLights
Find all the LightVisual visuals in the Scene.
Public propertyLoadedHeader
This will only be set for documents that have been loaded from disk
Public propertyMechanismsManager
Public propertyName
The file name of the document without the extension.
Public propertyNeedsSave
Whether the current document has been modified and needs saving.
Public propertyPackageTargetName
Public propertyScene
The top level SceneVisual.
Public propertyTagImporterFileName
The path to the tag server definitions file used when Import is pressed in the TagBrowser. This is equivalent to TagImporterProperties.FileName.
Public propertyTelegrams
Telegrams for high level emulation.
Public propertyTextureManager
Public propertyTime
The current simulation time.
Public propertyUndoRedoManager
The undo manager used to control undo's and redo's.
Public propertyUserVars
Temporary place for scripting to place variables, that will survive across resets. These values are *not* to be serialized.
Public propertyVisual
Top-level visual for the document
Public propertyVisuals
Use an enumerator to walk the scene tree.
Top
Methods
  NameDescription
Public methodCreateVisual(String)
Create a visual given a visual factory name. This can be a type such as "BoxVisual" or a name of a catalog component loaded into the current application.
Public methodCreateVisual(VisualFactory)
Create a visual given a visual factory. This is mostly used to create specific visuals from catalogs.
Public methodCreateVisual(XmlDocument)
Create a single visual from an XmlDocument.
Public methodCreateVisualT
Create a new visual of a given type such as BoxVisual.
Public methodCreateVisualFromSerialized
Create a single visual from a serialized version of the visual.
Public methodCreateVisuals
Create all visuals from an XML Document.
Public methodDestroyVisual
Delete this visual and remove it from the document.
Public methodError
Log an error message.
Public methodExportFrictionMatrix(String)
Public methodStatic memberExportFrictionMatrix(FrictionConfiguration, String)
Public methodFindAnyVisual
Find Visual by name, return one of them if there are multiple visuals, but do not warn if there are more than one.
Public methodFindCreateVisual
Attempt to find a child of the parent visual with the specified name. If it fails to find one, create one instead.
Public methodFindLayer
Find a layer by name.
Public methodFindType(Type)
Enumerate all visuals of a specified type.
Public methodFindType(Type, Boolean)
Enumerate all visuals of a specified type.
Public methodFindTypeT
Enumerate all visuals of a specified type.
Public methodCode exampleFindUserResource(String)
Gets the UserResource instance with the specified path within this document's user resources.
Public methodCode exampleFindUserResource(UserResourceReference)
Gets the UserResource instance with the specified UserResourceReference within this document's user resources.
Public methodFindVisualByName
Find the first visual in the document scene with a given name.
Public methodFindVisualsByName
Find all the visuals in the document scene with a given name.
Public methodGetLayer
Find or create a layer by name.
Public methodGetPackageManager
Public methodImportFrictionMatrix
Public methodImportTags
Load tag definitions and server configurations from disk. The path used is TagImporterFileName (equivalent to TagImporterProperties.FileName).
Public methodInfo
Log an info message.
Public methodLogEvent
Output event diagnostics to the current EventLogPath if not null.
Public methodLook(Vector3, Vector3)
Find the first visual from a location and in a direction.
Public methodLook(Vector3, Vector3, DocumentLookOptions)
Find the first visual from a location and in a direction with given DocumentLookOptions.
Public methodLookDown(Vector3)
Find the first visual below the lookFrom world location.
Public methodLookDown(Visual)
Find the first visual below the lookFrom visual.
Public methodLookDown(Vector3, DocumentLookOptions)
Find the first visual below the lookFrom world location with the given DocumentLookOptions.
Public methodLookDown(Visual, DocumentLookOptions)
Find the first visual below the lookFrom visual with the given DocumentLookOptions.
Public methodPurgeLayers
Remove all unused layers from the document.
Public methodPurgePortsProperties
Reset legacy "Ports" property for all visuals.
Public methodPurgeScripts
Remove all unused scripts from the document.
Public methodRun(Action)
Schedule an action to be called in the current time-step.
Public methodRun(FuncIEnumerable)
Schedule a coroutine to be called in the current time-step.
Public methodRun(Delegate, Object)
Schedule a delegate to be called with given arguments in the current time-step.
Public methodRun(Double, Action)
Schedule an action to be called after a delay in simulation time.
Public methodRun(Double, FuncIEnumerable)
Schedule a coroutine to be called after a delay in simulation time.
Public methodRun(Double, Delegate, Object)
Schedule a delegate to be called with given arguments after a delay in simulation time.
Public methodRunT(FuncT, IEnumerable, T)
Schedule a coroutine to be called in the current time-step.
Public methodRunT(Double, FuncT, IEnumerable, T)
Schedule a coroutine to be called after a delay in simulation time.
Public methodRunT1, T2(FuncT1, T2, IEnumerable, T1, T2)
Schedule a coroutine to be called in the current time-step.
Public methodRunT1, T2(Double, FuncT1, T2, IEnumerable, T1, T2)
Schedule a coroutine to be called after a delay in simulation time.
Public methodRunT1, T2, T3(FuncT1, T2, T3, IEnumerable, T1, T2, T3)
Schedule a coroutine to be called in the current time-step.
Public methodRunT1, T2, T3(Double, FuncT1, T2, T3, IEnumerable, T1, T2, T3)
Schedule a coroutine to be called after a delay in simulation time.
Public methodRunT1, T2, T3, T4(FuncT1, T2, T3, T4, IEnumerable, T1, T2, T3, T4)
Schedule a coroutine to be called in the current time-step.
Public methodRunT1, T2, T3, T4(Double, FuncT1, T2, T3, T4, IEnumerable, T1, T2, T3, T4)
Schedule a coroutine to be called after a delay in simulation time.
Public methodSave
Save the current document to disk with a thumbnail based on the Default view.
Public methodSave(Image)
Save the current document to disk with a custom thumbnail.
Public methodStart
Schedule a coroutine to be called in the current time-step.
Public methodUpdateCAD
Check if imported CAD has changed and re-import.
Public methodWarning
Log a warning message.
Top
Events
  NameDescription
Public eventOnDetachDebugger
Public eventResetListeners
Occurs when the document is reset.
Top
Fields
  NameDescription
Public fieldStatic memberFileExtension
The file extension to be used for documents including the '.'/period.
Public fieldStatic memberFileExtensionXml
The file extension to be used for documents in source control format including the '.'/period.
Public fieldPath
Filename for this document, empty for a new or unsaved document.
Top
Extension Methods
See Also