C# Класс Dynamo.Models.DynamoModel

The Dynamo model.
Наследование: Dynamo.Models.ModelBase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Context string
CustomNodeManager Dynamo.Utilities.CustomNodeManager
DebugSettings DebugSettings
LibraryServices LibraryServices
Loader NodeModelAssemblyLoader
Logger DynamoLogger
MigrationManager Dynamo.Models.MigrationManager
NodeFactory NodeFactory
PreferenceSettings PreferenceSettings
SearchModel NodeSearchModel

Private Properties

Свойство Тип Описание
AddNodeToCurrentWorkspace void
AddNodeTypeToSearch void
AddToGroup void
AddZeroTouchNodeToSearch void
AddZeroTouchNodeToSearch void
AddZeroTouchNodesToSearch void
CanDumpLibraryToXml bool
CreateOrLoadPreferences IPreferences
DeleteModelInternal void
DisplayEngineFailureMessage Dynamo.Models.TaskDialogEventArgs
DisplayFutureFileMessage bool
DisplayObsoleteFileMessage void
DumpLibrarySnapshot void
DumpLibraryToXml void
EngineController_TraceReconcliationComplete void
HideUnhideNamespace void
InitializeCustomNodeManager void
InitializeIncludedNodes void
InitializeInstrumentationLogger void
InitializeNodeLibrary void
InitializePreferences void
LibraryLoaded void
LoadExtensions IEnumerable
LoadNodeLibrary void
LogMessage void
LogWarningMessage void
MarkAllDependenciesAsModified void
OnAsyncTaskStateChanged void
OnRequestPresetNamePrompt void
OnRequestsFunctionNamePrompt void
OnShutdownCompleted void
OnShutdownStarted void
OnWorkspaceOpening void
OnWorkspacePropertyChanged void
OnWorkspaceSaved void
OpenFile bool
OpenHomeWorkspace bool
PostUIActivation void
PreferenceSettings_PropertyChanged void
RegisterCustomNodeDefinitionWithEngine void
RegisterHomeWorkspace void
RemoveExtension void
StartBackupFilesTimer void
UngroupModel void
UpdateCustomNodeDefinition void
UpdateManager_Log void

Открытые методы

Метод Описание
AddCustomNodeWorkspace ( Dynamo.Models.CustomNodeWorkspaceModel workspace ) : void

Add a new, visible Custom Node workspace to Dynamo

AddHomeWorkspace ( ) : void

Add a new HomeWorkspace and set as current

AddToSelection ( object parameters ) : void

Add an ISelectable object to the selection.

AddWorkspace ( Dynamo.Models.WorkspaceModel workspace ) : void

Adds a workspace to the dynamo model.

ClearCurrentWorkspace ( ) : void

Clear the workspace. Removes all nodes, notes, and connectors from the current workspace.

Copy ( ) : void

Copy selected ISelectable objects to the clipboard.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ForceRun ( ) : void

Forces an evaluation of the current workspace by resetting the DesignScript VM.

OpenCustomNodeWorkspace ( System.Guid guid ) : bool

Opens an existing custom node workspace.

OpenFileFromPath ( string xmlPath, bool forceManualExecutionMode = false ) : void

Opens a Dynamo workspace from a path to an Xml file on disk.

Paste ( ) : void

Paste ISelectable objects from the clipboard to the workspace so that the nodes appear in their original location with a slight offset

Paste ( Dynamo.Utilities.Point2D targetPoint, bool useOffset = true ) : void

Paste ISelectable objects from the clipboard to the workspace at specified point.

PostTraceReconciliation ( Dictionary orphanedSerializables ) : void

Deals with orphaned serializables.

RemoveWorkspace ( Dynamo.Models.WorkspaceModel workspace ) : void

Remove a workspace from the dynamo model.

ResetEngine ( bool markNodesAsDirty = false ) : void

Call this method to reset the virtual machine, avoiding a race condition by using a thread join inside the vm executive.

ShutDown ( bool shutdownHost ) : void

External components call this method to shutdown DynamoModel. This method marks 'ShutdownRequested' property to 'true'. This method is used rather than a public virtual method to ensure that the value of ShutdownRequested is set to true.

Start ( ) : DynamoModel

Start DynamoModel with all default configuration options

Start ( IStartConfiguration configuration ) : DynamoModel

Start DynamoModel with custom configuration. Defaults will be assigned not provided.

Защищенные методы

Метод Описание
DynamoModel ( IStartConfiguration config ) : Dynamo.Configuration

Default constructor for DynamoModel

PostShutdownCore ( bool shutdownHost ) : void
PreShutdownCore ( bool shutdownHost ) : void
ResetEngineInternal ( ) : void
SaveBackupFiles ( object state ) : void

Backup all the files

ShutDownCore ( bool shutdownHost ) : void

Приватные методы

Метод Описание
AddNodeToCurrentWorkspace ( Dynamo.Models.NodeModel node, bool centered, bool addToSelection = true ) : void

Adds a node to the current workspace.

AddNodeTypeToSearch ( Dynamo.Models.TypeLoadData typeLoadData ) : void
AddToGroup ( List modelsToAdd ) : void
AddZeroTouchNodeToSearch ( Dynamo.DSEngine.FunctionDescriptor functionDescriptor ) : void
AddZeroTouchNodeToSearch ( Dynamo.Engine.FunctionGroup funcGroup ) : void
AddZeroTouchNodesToSearch ( IEnumerable functionGroups ) : void
CanDumpLibraryToXml ( object obj ) : bool
CreateOrLoadPreferences ( IPreferences preferences ) : IPreferences
DeleteModelInternal ( List modelsToDelete ) : void
DisplayEngineFailureMessage ( Exception exception ) : Dynamo.Models.TaskDialogEventArgs

Call this method to display an error message in an event when live runner throws an exception that is not handled anywhere else. This message instructs user to save their work and restart Dynamo.

DisplayFutureFileMessage ( string fullFilePath, System.Version fileVersion, System.Version currVersion ) : bool

Displays file open error dialog if the file is of a future version than the currently installed version

DisplayObsoleteFileMessage ( string fullFilePath, System.Version fileVersion, System.Version currVersion ) : void

Call this method to display a message box when a file of an older version cannot be opened by the current version of Dynamo.

DumpLibrarySnapshot ( IEnumerable functionGroups ) : void
DumpLibraryToXml ( object parameter ) : void
EngineController_TraceReconcliationComplete ( Dynamo.DSEngine.TraceReconciliationEventArgs obj ) : void
HideUnhideNamespace ( bool hide, string library, string namespc ) : void

This method updates the node search library to either hide or unhide nodes that belong to a specified assembly name and namespace. These nodes will be hidden from the node library sidebar and from the node search.

InitializeCustomNodeManager ( ) : void
InitializeIncludedNodes ( ) : void
InitializeInstrumentationLogger ( ) : void
InitializeNodeLibrary ( IPreferences preferences ) : void
InitializePreferences ( IPreferences preferences ) : void
LibraryLoaded ( object sender, LibraryServices e ) : void

LibraryLoaded event handler.

LoadExtensions ( ) : IEnumerable
LoadNodeLibrary ( Assembly assem ) : void
LogMessage ( ILogMessage obj ) : void
LogWarningMessage ( LogWarningMessageEventArgs args ) : void

This warning message is displayed on the node associated with the FFI dll

MarkAllDependenciesAsModified ( CustomNodeDefinition def ) : void

Returns all function instances directly or indirectly depends on the specified function definition and mark them as modified so that their values will be re-queried.

OnAsyncTaskStateChanged ( DynamoScheduler sender, TaskStateChangedEventArgs e ) : void

This event handler is invoked when DynamoScheduler changes the state of an AsyncTask object. See TaskStateChangedEventArgs.State for more details of these state changes.

OnRequestPresetNamePrompt ( Dynamo.Models.PresetsNamePromptEventArgs e ) : void
OnRequestsFunctionNamePrompt ( Object sender, Dynamo.Models.FunctionNamePromptEventArgs e ) : void
OnShutdownCompleted ( ) : void
OnShutdownStarted ( ) : void
OnWorkspaceOpening ( XmlDocument obj ) : void
OnWorkspacePropertyChanged ( object sender, PropertyChangedEventArgs args ) : void
OnWorkspaceSaved ( Dynamo.Models.WorkspaceModel model ) : void
OpenFile ( Dynamo.Models.WorkspaceInfo workspaceInfo, XmlDocument xmlDoc, Dynamo.Models.WorkspaceModel &workspace ) : bool
OpenHomeWorkspace ( XmlDocument xmlDoc, Dynamo.Models.WorkspaceInfo workspaceInfo, Dynamo.Models.WorkspaceModel &workspace ) : bool
PostUIActivation ( object parameter ) : void
PreferenceSettings_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Responds to property update notifications on the preferences, and synchronizes with the Units Manager.

RegisterCustomNodeDefinitionWithEngine ( CustomNodeDefinition definition ) : void

Registers (or re-registers) a Custom Node definition with the DesignScript VM, so that instances of the custom node can be evaluated.

RegisterHomeWorkspace ( Dynamo.Models.HomeWorkspaceModel newWorkspace ) : void
RemoveExtension ( IExtension ext ) : void
StartBackupFilesTimer ( ) : void

Start the timer to backup files periodically

UngroupModel ( List modelsToUngroup ) : void
UpdateCustomNodeDefinition ( CustomNodeDefinition definition ) : void

Register custom node defintion and execute all custom node instances.

UpdateManager_Log ( LogEventArgs args ) : void

Описание методов

AddCustomNodeWorkspace() публичный Метод

Add a new, visible Custom Node workspace to Dynamo
public AddCustomNodeWorkspace ( Dynamo.Models.CustomNodeWorkspaceModel workspace ) : void
workspace Dynamo.Models.CustomNodeWorkspaceModel to add
Результат void

AddHomeWorkspace() публичный Метод

Add a new HomeWorkspace and set as current
public AddHomeWorkspace ( ) : void
Результат void

AddToSelection() публичный Метод

Add an ISelectable object to the selection.
public AddToSelection ( object parameters ) : void
parameters object The object to add to the selection.
Результат void

AddWorkspace() публичный Метод

Adds a workspace to the dynamo model.
public AddWorkspace ( Dynamo.Models.WorkspaceModel workspace ) : void
workspace Dynamo.Models.WorkspaceModel
Результат void

ClearCurrentWorkspace() публичный Метод

Clear the workspace. Removes all nodes, notes, and connectors from the current workspace.
public ClearCurrentWorkspace ( ) : void
Результат void

Copy() публичный Метод

Copy selected ISelectable objects to the clipboard.
public Copy ( ) : void
Результат void

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

DynamoModel() защищенный Метод

Default constructor for DynamoModel
protected DynamoModel ( IStartConfiguration config ) : Dynamo.Configuration
config IStartConfiguration Start configuration
Результат Dynamo.Configuration

ForceRun() публичный Метод

Forces an evaluation of the current workspace by resetting the DesignScript VM.
public ForceRun ( ) : void
Результат void

OpenCustomNodeWorkspace() публичный Метод

Opens an existing custom node workspace.
public OpenCustomNodeWorkspace ( System.Guid guid ) : bool
guid System.Guid Identifier of the workspace to open
Результат bool

OpenFileFromPath() публичный Метод

Opens a Dynamo workspace from a path to an Xml file on disk.
public OpenFileFromPath ( string xmlPath, bool forceManualExecutionMode = false ) : void
xmlPath string Path to file
forceManualExecutionMode bool Set this to true to discard /// execution mode specified in the file and set manual mode
Результат void

Paste() публичный Метод

Paste ISelectable objects from the clipboard to the workspace so that the nodes appear in their original location with a slight offset
public Paste ( ) : void
Результат void

Paste() публичный Метод

Paste ISelectable objects from the clipboard to the workspace at specified point.
public Paste ( Dynamo.Utilities.Point2D targetPoint, bool useOffset = true ) : void
targetPoint Dynamo.Utilities.Point2D Location where data will be pasted
useOffset bool Indicates whether we will use current workspace offset or paste nodes /// directly in this point.
Результат void

PostShutdownCore() защищенный Метод

protected PostShutdownCore ( bool shutdownHost ) : void
shutdownHost bool
Результат void

PostTraceReconciliation() публичный Метод

Deals with orphaned serializables.
public PostTraceReconciliation ( Dictionary orphanedSerializables ) : void
orphanedSerializables Dictionary Collection of orphaned serializables.
Результат void

PreShutdownCore() защищенный Метод

protected PreShutdownCore ( bool shutdownHost ) : void
shutdownHost bool
Результат void

RemoveWorkspace() публичный Метод

Remove a workspace from the dynamo model.
public RemoveWorkspace ( Dynamo.Models.WorkspaceModel workspace ) : void
workspace Dynamo.Models.WorkspaceModel Workspace to remove
Результат void

ResetEngine() публичный Метод

Call this method to reset the virtual machine, avoiding a race condition by using a thread join inside the vm executive.
public ResetEngine ( bool markNodesAsDirty = false ) : void
markNodesAsDirty bool Set this parameter to true to force /// reset of the execution substrait. Note that setting this parameter /// to true will have a negative performance impact.
Результат void

ResetEngineInternal() защищенный Метод

protected ResetEngineInternal ( ) : void
Результат void

SaveBackupFiles() защищенный Метод

Backup all the files
protected SaveBackupFiles ( object state ) : void
state object
Результат void

ShutDown() публичный Метод

External components call this method to shutdown DynamoModel. This method marks 'ShutdownRequested' property to 'true'. This method is used rather than a public virtual method to ensure that the value of ShutdownRequested is set to true.
public ShutDown ( bool shutdownHost ) : void
shutdownHost bool Set this parameter to true to shutdown /// the host application.
Результат void

ShutDownCore() защищенный Метод

protected ShutDownCore ( bool shutdownHost ) : void
shutdownHost bool
Результат void

Start() публичный статический Метод

Start DynamoModel with all default configuration options
public static Start ( ) : DynamoModel
Результат DynamoModel

Start() публичный статический Метод

Start DynamoModel with custom configuration. Defaults will be assigned not provided.
public static Start ( IStartConfiguration configuration ) : DynamoModel
configuration IStartConfiguration Start configuration
Результат DynamoModel

Описание свойств

Context публичное свойство

The context that Dynamo is running under.
public string Context
Результат string

CustomNodeManager публичное свойство

Custom Node Manager instance, manages all loaded custom nodes.
public CustomNodeManager,Dynamo.Utilities CustomNodeManager
Результат Dynamo.Utilities.CustomNodeManager

DebugSettings публичное свойство

Debugging settings for this instance of Dynamo.
public DebugSettings DebugSettings
Результат DebugSettings

LibraryServices публичное свойство

Manages all loaded ZeroTouch libraries.
public LibraryServices LibraryServices
Результат LibraryServices

Loader публичное свойство

Manages all loaded NodeModel libraries.
public NodeModelAssemblyLoader Loader
Результат NodeModelAssemblyLoader

Logger публичное свойство

The Dynamo Logger, receives and manages all log messages.
public DynamoLogger Logger
Результат DynamoLogger

MigrationManager публичное свойство

Migration Manager, upgrades old Dynamo file formats to the current version.
public MigrationManager,Dynamo.Models MigrationManager
Результат Dynamo.Models.MigrationManager

NodeFactory публичное свойство

Node Factory, used for creating and intantiating loaded Dynamo nodes.
public NodeFactory NodeFactory
Результат NodeFactory

PreferenceSettings публичное свойство

Preference settings for this instance of Dynamo.
public PreferenceSettings PreferenceSettings
Результат PreferenceSettings

SearchModel публичное свойство

The Dynamo Node Library, complete with Search.
public NodeSearchModel SearchModel
Результат NodeSearchModel