Property | Type | Description | |
---|---|---|---|
NodeFactory | NodeFactory |
Property | Type | Description | |
---|---|---|---|
guid | Guid |
Method | Description | |
---|---|---|
Clear ( ) : void |
Clears this workspace of nodes, notes, and connectors.
|
|
CreateModel ( |
Creates ModelBase object by given xml data and adds it to corresponding collection of the workspace.
|
|
DeleteModel ( |
Deletes ModelBase object given by XmlElement from a corresponding collection of the workspace.
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
GetModelForElement ( |
Gets model by GUID which is contained in given Xml data.
|
|
GetModelInternal ( System.Guid modelGuid ) : Dynamo.Models.ModelBase |
Returns model by GUID
|
|
GetSharedName ( ) : string |
Returns appropriate name of workspace for sharing.
|
|
ImportPresets ( IEnumerable |
Adds a specified collection PresetModel objects to the preset collection of the workspace.
|
|
RecordModelsForModification ( IEnumerable |
Implement recording node modification for undo/redo.
|
|
ReloadModel ( |
Updates ModelBase object with given xml data
|
|
RemoveGroup ( Dynamo.Models.ModelBase model ) : void |
Deletes AnnotationModel object from annotation collection of the workspace.
|
|
RemovePreset ( PresetModel state ) : void |
Removes a specified PresetModel object from the preset collection of the workspace.
|
|
ReportPosition ( ) : void |
Called when workspace position is changed. This method notifyies all the listeners when a workspace is changed.
|
|
Save ( ProtoCore runtimeCore ) : bool |
Save assuming that the Filepath attribute is set.
|
|
SaveAs ( string newPath, ProtoCore runtimeCore, bool isBackup = false ) : bool |
Save to a specific file path, if the path is null or empty, does nothing. If successful, the CurrentWorkspace.FilePath field is updated as a side effect
|
Method | Description | |
---|---|---|
DisposeNode ( Dynamo.Models.NodeModel node ) : void | ||
Log ( ILogMessage obj ) : void | ||
Log ( string msg ) : void | ||
Log ( string msg, WarningLevel severity ) : void | ||
NodeModified ( Dynamo.Models.NodeModel node ) : void |
Indicates that the AST for a node in this workspace requires recompilation
|
|
OnAnnotationAdded ( AnnotationModel annotation ) : void | ||
OnAnnotationRemoved ( AnnotationModel annotation ) : void | ||
OnAnnotationsCleared ( ) : void | ||
OnConnectorAdded ( ConnectorModel obj ) : void | ||
OnConnectorDeleted ( ConnectorModel obj ) : void | ||
OnNodeAdded ( Dynamo.Models.NodeModel node ) : void | ||
OnNodeRemoved ( Dynamo.Models.NodeModel node ) : void | ||
OnNodesCleared ( ) : void | ||
OnNoteAdded ( NoteModel note ) : void | ||
OnNoteRemoved ( NoteModel note ) : void | ||
OnNotesCleared ( ) : void | ||
OnSaving ( |
||
OnToggleNodeFreeze ( Dynamo.Models.NodeModel obj ) : void | ||
OnWorkspaceSaved ( ) : void | ||
PopulateXmlDocument ( |
||
RegisterNode ( Dynamo.Models.NodeModel node ) : void | ||
RequestRun ( ) : void | ||
ResetWorkspaceCore ( ) : void |
Derived workspace classes can choose to override this method to perform clean-up specific to them.
|
|
SerializeSessionData ( |
||
WorkspaceModel ( IEnumerable |
Method | Description | |
---|---|---|
AddAndRegisterNode ( Dynamo.Models.NodeModel node, bool centered = false ) : void |
Adds a node to this workspace.
|
|
AddAnnotation ( string text, System.Guid id ) : AnnotationModel | ||
AddAnnotation ( AnnotationModel annotationModel ) : void | ||
AddNewAnnotation ( AnnotationModel annotation ) : void | ||
AddNode ( Dynamo.Models.NodeModel node ) : void | ||
AddNote ( bool centerNote, double xPos, double yPos, string text, System.Guid id ) : NoteModel | ||
AddNote ( NoteModel note ) : void | ||
AddNote ( NoteModel note, bool centered ) : void | ||
AddPreset ( string name, string description, IEnumerable |
||
AddPresetCore ( string name, string description, IEnumerable |
this method creates a new preset state from a set of NodeModels and adds this new state to this presets collection
|
|
ApplyPreset ( PresetModel state ) : void | ||
AvoidSubgraphOverlap ( ) : void |
This method repeatedly shifts subgraphs away vertically from each other when there are any two nodes from different subgraphs overlapping.
|
|
CheckIfModelExistsInSameGroup ( IEnumerable |
Checks if model exists in same group.
|
|
ClearAnnotations ( ) : void | ||
ClearNodes ( ) : void | ||
ClearNotes ( ) : void | ||
ClearUndoRecorder ( ) : void | ||
ComputeUpstreamCacheForEntireGraph ( ) : void |
This method ensures that all upstream node caches are correct by calling ComputeUpstreamOnDownstream on all source nodes in the graph, this is done in such a way that each node is only computed once.
|
|
ConvertNodesToCodeInternal ( Dynamo.Engine.EngineController engineController, INamingProvider namingProvider ) : void | ||
DoGraphAutoLayout ( ) : void |
This function wraps a few methods on the workspace model layer to set up and run the graph layout algorithm.
|
|
GenerateCombinedGraph ( bool isGroupLayout ) : void |
This method extracts all models from the workspace and puts them into the combined graph object, LayoutSubgraphs.First() True if all the selected models are groups.
|
|
GenerateSeparateSubgraphs ( HashSet |
This method repeatedly takes a selected node in the combined graph and uses breadth-first search to find all other nodes in the same subgraph until all selected nodes have been processed.
|
|
GetHangingNodes ( ) : IEnumerable |
||
GetModelsInternal ( IEnumerable |
Gets model list by their GUIDs
|
|
GetSourceNodes ( ) : IEnumerable |
Returns the nodes in the graph that have no inputs or have none of their inputs filled
|
|
GetStringRepOfWorkspace ( ) : string | ||
IncrementPasteOffset ( ) : void |
Increment the current paste offset to prevent overlapping pasted elements
|
|
IsInternalNodeToCodeConnection ( IEnumerable |
Checks whether the given connection is inside the node to code set or outside it. This determines if it should be redrawn(if it is external) or if it should be deleted (if it is internal)
|
|
OnCurrentOffsetChanged ( object sender, Dynamo.Models.PointEventArgs e ) : void |
Used during open and workspace changes to set the location of the workspace
|
|
OnRequestNodeCentered ( object sender, Dynamo.Models.ModelEventArgs e ) : void |
Requests that a Node or Note model should be centered.
|
|
OnSyncWithDefinitionEnd ( Dynamo.Models.NodeModel nodeModel ) : void | ||
OnSyncWithDefinitionStart ( Dynamo.Models.NodeModel nodeModel ) : void | ||
OnZoomChanged ( object sender, Dynamo.Models.ZoomEventArgs e ) : void |
Used during open and workspace changes to set the zoom of the workspace
|
|
ReConnectInputConnections ( string>.Dictionary |
Forms new connections from the external nodes to the Node To Code Node, based on the connectors passed as inputs.
|
|
ReConnectOutputConnections ( string>.Dictionary |
Forms new connections from the external nodes to the Node To Code Node, based on the connectors passed as inputs.
|
|
RecordAndDeleteModels ( List |
||
RecordCreatedModel ( Dynamo.Models.ModelBase model ) : void | ||
RecordCreatedModels ( List |
||
RecordGroupModelBeforeUngroup ( AnnotationModel annotation ) : void | ||
RecordModelForModification ( Dynamo.Models.ModelBase model, Dynamo.Core.UndoRedoRecorder recorder ) : void | ||
RecordModelsForModification ( List |
TODO(Ben): This method is exposed this way for external codes (e.g. the DragCanvas) to record models before they are modified. This is by no means ideal. The ideal case of course is for ALL codes that end up modifying models to be folded back into WorkspaceViewModel in the form of commands. These commands then internally record those affected models before updating them. We need this method to be gone sooner than later.
|
|
RecordModelsForUndo ( UndoRedoRecorder.UserAction>.Dictionary |
||
RecordUndoGraphLayout ( bool isGroupLayout ) : void |
This method adds relevant models to the undo recorder.
|
|
Redo ( ) : void | ||
RegisterConnector ( ConnectorModel connector ) : void | ||
RemoveAndDisposeNode ( Dynamo.Models.NodeModel model, bool dispose = true ) : void |
Removes a node from this workspace. This method does not raise a NodesModified event. (LC notes this is clearly not true)
|
|
RemoveAnnotation ( AnnotationModel annotation ) : void | ||
RemoveNote ( NoteModel note ) : void | ||
ResetWorkspace ( ) : void | ||
RunLayoutSubgraph ( GraphLayout graph, bool isGroupLayout ) : void |
This function calls the graph layout algorithm methods.
|
|
SaveInternal ( string targetFilePath, ProtoCore runtimeCore ) : bool | ||
SaveLayoutGraph ( ) : void |
This method pushes changes from the GraphLayout.Graph objects back to the workspace models.
|
|
SendModelEvent ( System.Guid modelGuid, string eventName, int value ) : void | ||
SerializeElementResolver ( |
||
SetModelEventOnAnnotation ( ) : void |
this sets the event on Annotation. This event return the model from the workspace. When a model is ungrouped from a group, that model will be deleted from that group. So, when UNDO execution, cannot get that model from that group, it has to get from the workspace. The below method will set the event on every annotation model, that will return the specific model from workspace.
|
|
ShouldProceedWithRecording ( UndoRedoRecorder.UserAction>.Dictionary |
||
ShouldProceedWithRecording ( List |
||
Undo ( ) : void | ||
UpdateModelValue ( IEnumerable |
||
annotationModel_GetModelBase ( Guid modelGuid ) : ModelBase |
Returns the model from Workspace
|
|
computeUpstreamNodesWhenWorkspaceAdded ( WorkspacesModificationEventArgs args ) : void |
Computes the upstream nodes when workspace is added. when a workspace is added (assuming that all the nodes and its connectors were added successfully) compute the upstream cache for all the frozen nodes.
|
public CreateModel ( |
||
modelData | Xml data to create model | |
return | void |
public DeleteModel ( |
||
modelData | ||
return | void |
protected DisposeNode ( Dynamo.Models.NodeModel node ) : void | ||
node | Dynamo.Models.NodeModel | |
return | void |
public GetModelForElement ( |
||
modelData | Xml data to find model. | |
return | Dynamo.Models.ModelBase |
public GetModelInternal ( System.Guid modelGuid ) : Dynamo.Models.ModelBase | ||
modelGuid | System.Guid | Identifier of the requested model. |
return | Dynamo.Models.ModelBase |
public ImportPresets ( IEnumerable |
||
presetCollection | IEnumerable |
|
return | void |
protected Log ( string msg, WarningLevel severity ) : void | ||
msg | string | |
severity | WarningLevel | |
return | void |
protected NodeModified ( Dynamo.Models.NodeModel node ) : void | ||
node | Dynamo.Models.NodeModel | |
return | void |
protected OnAnnotationAdded ( AnnotationModel annotation ) : void | ||
annotation | AnnotationModel | |
return | void |
protected OnAnnotationRemoved ( AnnotationModel annotation ) : void | ||
annotation | AnnotationModel | |
return | void |
protected OnConnectorAdded ( ConnectorModel obj ) : void | ||
obj | ConnectorModel | |
return | void |
protected OnConnectorDeleted ( ConnectorModel obj ) : void | ||
obj | ConnectorModel | |
return | void |
protected OnNodeAdded ( Dynamo.Models.NodeModel node ) : void | ||
node | Dynamo.Models.NodeModel | |
return | void |
protected OnNodeRemoved ( Dynamo.Models.NodeModel node ) : void | ||
node | Dynamo.Models.NodeModel | |
return | void |
protected OnNoteAdded ( NoteModel note ) : void | ||
note | NoteModel | |
return | void |
protected OnNoteRemoved ( NoteModel note ) : void | ||
note | NoteModel | |
return | void |
protected OnSaving ( |
||
obj | ||
return | void |
protected OnToggleNodeFreeze ( Dynamo.Models.NodeModel obj ) : void | ||
obj | Dynamo.Models.NodeModel | |
return | void |
protected PopulateXmlDocument ( |
||
xmlDoc | ||
return | bool |
public RecordModelsForModification ( IEnumerable |
||
models | IEnumerable |
Collection of |
return | void |
protected RegisterNode ( Dynamo.Models.NodeModel node ) : void | ||
node | Dynamo.Models.NodeModel | |
return | void |
public ReloadModel ( |
||
modelData | Xml data to update model | |
return | void |
public RemoveGroup ( Dynamo.Models.ModelBase model ) : void | ||
model | Dynamo.Models.ModelBase | |
return | void |
public RemovePreset ( PresetModel state ) : void | ||
state | PresetModel | |
return | void |
public Save ( ProtoCore runtimeCore ) : bool | ||
runtimeCore | ProtoCore | The |
return | bool |
public SaveAs ( string newPath, ProtoCore runtimeCore, bool isBackup = false ) : bool | ||
newPath | string | The path to save to |
runtimeCore | ProtoCore | The |
isBackup | bool | Indicates whether saved workspace is backup or not. If it's not backup, /// we should add it to recent files. Otherwise leave it. |
return | bool |
protected SerializeSessionData ( |
||
document | ||
runtimeCore | ProtoCore | |
return | void |
protected WorkspaceModel ( IEnumerable |
||
nodes | IEnumerable |
|
notes | IEnumerable |
|
annotations | IEnumerable |
|
info | WorkspaceInfo | |
factory | NodeFactory | |
presets | IEnumerable |
|
resolver | ElementResolver | |
return | Dynamo.Core |