-
Notifications
You must be signed in to change notification settings - Fork 636
API Changes in Dynamo 2.0
This document details changes to the Dynamo API done in the 2.0 release.
DynamoPackagesWpf.dll
is added to Dynamo 2.0 to facilitate view extensions.
DesignscriptBuiltin.dll
is added to Dynamo 2.0 and contains Dictionary
methods.
-
VisitIdentifierNode()
,VisitIdentifierListNode()
new returnsbool
.
-
IsBackgroundPreviewActive
inPreferenceSettings.cs
is obsolete now. Please useBackgroundPreviews
. -
IPreviewBubblePreference
is removed. -
IBackGroundPreviewPreference
is removed. -
BackgroundPreviews
is added toIPreferences
interface. -
ShowPreviewBubbles
is added toIPreferences
interface. -
GetIsBackGroundPreviewActive(string)
is added toIPreferences
interface.
-
CreationName
property added toCustomNodeSearchElement.cs
. This returns a name using which this node can be created -
FullName
property inNodeSearchElement.cs
isvirtual property
now.
-
DefaultValueString
property added toTypedParameter.cs
. Use this to get string representation of AST node -
Dynamo.Library.TypedParameter.ToCommentNameString
replacesToNameString
. -
Dynamo.Library.TypedParameter
constructor is changed to take an optional summary string.
-
NodeCommands.ValidateConnectionsCommand
has been removed. -
DynamoModel.DynamoReady
event is added. -
DynamoPreferencesData
class is added toDynamoModel.cs
. This class contains the extra Dynamo-specific preferences data -
RequestWorkspaceBackUpSave
event added toDynamoModel.cs
. This event occurs when a workspace is scheduled to be saved to a backup file -
WorkspaceOpening
event inDynamoModel.cs
takesobject
instead ofXMLElement
. -
HostVersion
andHostName
properties added toDynamoModel.cs
.
-
PythonTemplateFilePath
property is added toPathManager.cs
-
CustomNodeManager(..)
hasLibraryServices libraryServices
as an option. ex:CustomNodeManager(NodeFactory nodeFactory, MigrationManager migrationManager, LibraryServices libraryServices)
-
TryGetCustomNodeData(..)
,CreateCustomNodeInstance(..)
are added toCustomNodeManager.cs
- The property
NodeMigrationAttribute.To
has been removed. - The property
NodeMigrationAttribute.From
has been renamed toNodeMigrationAttribute.Version
.
-
ExtensionLoader.ExtensionLoading
event was added. -
Dynamo.Extensions.IExtensionSource
was added - this interface backs objects which can load other extensions. -
Dynamo.Extensions.ReadyParams.StartupParams
was added. -
ExtensionManager class
has new methods -RegisterService(), UnregisterService(), GetService(..)
- The
LibraryServices.GetFunctionDescriptor
method has been made public. -
CompilationServices(..)
takesLibraryServices
instead ofProtoCore.Core
. -
IsLacingDisabled
property added toFunctionDescriptor.cs
. -
GetFunctionDescriptor(..
is added toLibraryServices.cs
. -
GetPriorNames()
added toLibraryServices.cs
. This returns a dictionary of old names vs. new names for node migration -
GetAllFunctionDescriptors()
added toLibraryServices.cs
. This returns a list of function descriptors associated with the function name.
-
Dynamo.Graph.SaveContext.None
was added. -
UndoRedoRecorder.RecordModelAsOffTrack(Guid)
was removed.
-
Workspace
: -
X
andY
,Zoom
,Height
,Width
onWorkspaceModel
have been made obsolete and should be retrieved via theWorkspaceViewModel
instead as these are view properties. -
X
andY
andZoom
onNodeModel
have been made obsolete and should be retrieved via theNodeViewModel
instead as these are view properties. -
CanUndo
andCanRedo
removed fromWorkspaceModel.cs
-
The
DynamoModel.AddWorkspace
method has been made public. -
A new constructor was added for
WorkspaceInfo
to facilitate deserialization. -
A new constructor is added for
HomeWorkspaceModel
to facilitate deserialization. -
The
DSFunction.FunctionName
property is added to facilitate serialization. -
The
VariableInputNode.VariableInputPorts
property is added to facilitate serialization. -
Converter classes are added to support serialization and deserialization.
-
Some method parameters have changed names to align with the properties which they set internally. This facilitates deserialization.
-
The
Function.IsCustomNode
andFunction.FunctionUuid
properties have been added to facilitate serialization. -
WorkspaceModel.save
now returns void. -
constructor
HomeWorkspaceModel(...)
added toHomeWorkspaceModel.cs
-
SerializationExtensions.cs
class is added to facilitate serializing a WorkspaceModel to json -
UndoRedo.cs
class is added toWorkspaceModel
. -
WorkspaceInfo(..)
constructor added toWorkspaceInfo.cs
. -
ScaleFactor
property added toWorkspaceInfo.cs
. -
ExtraWorkspaceViewInfo
,ExtraNodeViewInfo
ExtraNoteViewInfo
,ExtraAnnotationViewInfo
class added toWorkspaceModel.cs
. This is a Non view-specific container for additional view information required to fully construct a WorkspaceModel from JSON -
Dependencies
property is added toWorkspaceModel.cs
. This gathers the direct workspace dependencies of this workspace -
Annotations
is obsolete inWorkspaceModel.cs
. please use Annotations on the WorkspaceViewModel. -
FromJson(...)
added toWorkspaceModel.cs
. This loads a WorkspaceModel from json -
UpdateWithExtraWorkspaceViewInfo(..)
method added toWorkspaceModel.cs
. This Updates a workspace model with extra view information -
DeleteModel(..)
,CreateModel(..)
,ReloadModel(..)
,GetModelForElement(..)
GetModelInternal(..)
methods removed from `WorkspaceModel.cs. -
SerializationExtensions class
has been added to provide theWorkspaceModel.ToJson(...)
extension method -
DynamoModel.SaveWorkspace
is removed. UseWorkspaceModel.Save
instead. -
WorkspaceModel.WorkspaceSaved
event is nowWorkspaceModel.Saved
NodeModel
:
-
NodeModel.HasInput(...)
has been removed. UsePortModel.IsConnected
instead. -
NodeModel.ValidateConnections()
has been removed. -
NodeModel.RegisterInputPorts()
is nowNodeModel.RegisterInputPorts(IEnumerable<PortData> portDatas)
. ButNodeModel.RegisterInputPorts
is deprecated. Please use theInPortNamesAttribute
,InPortDescriptionsAttribute
, andInPortTypesAttribute
instead. -
NodeModel.RegisterOutputPorts()
is nowNodeModel.RegisterOutputPorts(IEnumerable<PortData> portDatas)
. ButNodeModel.RegisterOutputPorts()
is deprecated. Please use theOutPortNamesAttribute
,OutPortDescriptionsAttribute
, andOutPortTypesAttribute
instead. -
NodeModel.AddPort(...)
has been removed. Ports can now be added usingNodeModel.InPorts.Add(...)
andNodeModel.OutPorts.Add(...)
-
The
PortModel.Data
property has been removed. -
The
PortModel.ToolTipContent
property is nowPortModel.ToolTip
. -
PortModel.DefaultValueEnabled
has been removed. Please usePortModel.DefaultValue == null
to check whether a port has a default value. -
NodeInputData.cs
class is added to Nodes. -
NodeOutputData.cs
class is added to Nodes. -
NodeOutPutTypes
enum is added for supported output data types. -
Statement.GetDefinedVariableNames
has a boolean parameter removed. -
Variable.NameWithIndex
was added. -
IsUpstreamVisible
,OverrideNameWithNickName
are removed fromNodeModel.cs
.DictionaryLink
property added toNodeModel.cs
. -
SetNickNameFromAttribute()
changed toSetNameFromNodeNameAttribute()
inNodeModel.cs
. -
ClearRuntimeError()
changed toClearErrorsAndWarnings()
inNodeModel.cs
. -
ValidateConnections()
is removed fromNodeModel.cs
. -
PortName
property is nowName
property inPortModel.cs
. -
ToolTipContent
property is nowToolTip
inPortModel.cs
. -
ShouldKeepListStructure
is nowKeepListStructure
inPortModel.cs
. -
IsOutPutNode
andIsSetAsOutput
are added toNodeModel
-
OutputData
is added toNodeModel
Other Models
:
-
Many properties now include attributes from Json.net.
-
AnnotationModel
has been made Obsolete should be retrieved via theWorkspaceViewModel
instead. -
AnnotationModel.SelectedModels
is changed toAnnotationModel.Nodes
-
PresetModel
has been made obsolete. -
TextMaxWidth
property is added toAnnotationModel.cs
-
ConnectorModel(PortModel start, PortModel end, Guid guid)
constructor is added toConnectorModel.cs
. -
ShouldSerializeX()
andShouldSerializeY()
added toModelBase.cs
.Guid
property inModelBase.cs
is now virtual. -
UpdatePortsForUnresolved(..)
method added toFunction.cs
. constructorSymbol(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts, TypedParameter parameter)
andOutput(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts)
added toFunction.cs
-
constructor
DummyNode(..)
added toDummyNode.cs
. This function creates DummyNode with specified number of ports -
OriginalNodeContent
inDummyNode.cs
returnsobject
instead ofXMLElement
. -
NickName
is changed toName
inFunctionCallNodeController.cs
. -
FunctionSignature
property is added toDSFunction.cs
andDSVarArgFunction.cs
. Also,DSVarArgFunction.cs
hasFunctionType
property added. -
LayoutExtensions.cs
class is added to Workspaces. This contains methods for organizing graphs. -
NodeReadConverter
,WorkspaceReadConverter
,WorkspaceWriteConverter
,DummyNodeWriteConverter
,ConnectorConverter
,IdToGuidConverter
,TypedParameterConverter
,IdReferenceResolver
are added to the new classSerializationConverters.cs
. -
CodeBlockNodeModel.TempVariables
andIsTempIdentifer
are removed. -
CodeBlockNodeModel.LoadAndCreateConnectors
signature has changed to accept aSaveContext
parameter. -
Dynamo.Updates.IHostManager
folded intoIUpdateManager
.
-
DynamoView.LibraryCollapsed
is added. -
DynamoView.GetUniqueAddOnCategories
is added. -
ShowHideConsoleMenuConverter
is removed. -
SHowHidePreviewBubblesConverter
is removed. -
DefaultWatchHandler.Process
andProcessThing
now accept a new parameter - a preferred Dictionary ordering of keys names. -
IWatchHandler
interface is updated with new process signature. -
GenerateWatchViewModelForData()
is updated with new signature accepting preferred ordering of keys. -
WatchHandlerCallback
invoke
andbeginInvoke
updated with new signature accepting preferred ordering of keys. -
DynamoViewModel.TogglePreviewBubbleShowingCommand
is removed. -
NodeViewModel.IsOuput
is added. -
NodeViewModel.IsSetAsOutput
is added. -
Dynamo.Wpf.Extensions.IViewExtensionSource
is added. -
Dynamo.Wpf.Extensions.ViewExtensionLoader.ExtensionLoading
event is added. -
Dynamo.wpf.Extensions.ViewLoadedParams.ViewStartupParams
is added. -
Dynamo.Wpf.ViewModels.Watch3d.CameraData.Equals
is added. -
Dynamo.Wpf.ViewModesl.Watch3d.IWatchPreferenceProperties
folded intoDynamo.Wpf.ViewModels.Watch3d.IWatch3dViewModel.PreferenceWatchName
.
- The Workspaces assembly is added with methods for serializing and deserializing WorkspaceModel objects to json.
- Public default constructors have been added for
CombinatorNode
types to facilitate serialization.
- All classes in CoreNodeModelsWpf in Dynamo.Wpf moved to CoreNodeModelsWpf namespace
- The
Dynamo.Wpf
namespace has been removed toCoreNodeModelsWpf
-
Dynamo.Wpf.DoubleSliderSettingsControl
is nowCoreNodeModelsWpf.DoubleSliderSettingsControl
-
Dynamo.Wpf.ElementSelectionControl
is nowCoreNodeModelsWpf.ElementSelectionControl
-
Dynamo.Wpf.IntegerSliderSettingsControl
is nowCoreNodeModelsWpf.IntegerSliderSettingsControl
-
Dynamo.Wpf.ConverterViewModel
is nowCoreNodeModelsWpf.ConverterViewModel
-
Dynamo.Wpf.SliderViewModel<T>
is nowCoreNodeModelsWpf.SliderViewModel<T>
-
- The
Dynamo.Wpf.Controls
namespace has been removed toCoreNodeModelsWpf.Controls
-
Dynamo.Wpf.Controls.DateTimeInputControl
is nowCoreNodeModelsWpf.Controls.DateTimeInputControl
-
Dynamo.Wpf.Controls.DynamoConverterControl
is nowCoreNodeModelsWpf.Controls.DynamoConverterControl
-
Dynamo.Wpf.Controls.DynamoSlider
is nowCoreNodeModelsWpf.Controls.DynamoSlider
-
- The
Dynamo.Wpf.Converters
namespace has been removed toCoreNodeModelsWpf.Converters
-
Dynamo.Wpf.Converters.SelectionButtonContentConverter
is nowCoreNodeModelsWpf.SelectionButtonContentConverter
-
Dynamo.Wpf.Converters.StringToDateTimeConverter
is nowCoreNodeModelsWpf.Converters.StringToDateTimeConverter
-
- The
Dynamo.Wpf.Nodes
namespace has been removed toCoreNodeModelsWpf.Nodes
-
Dynamo.Wpf.Nodes.BoolSelectorNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.BoolSelectorNodeViewCustomization
-
Dynamo.Wpf.Nodes.ColorRangeNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.ColorRangeNodeViewCustomization
-
Dynamo.Wpf.Nodes.CreateListNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.CreateListNodeViewCustomization
-
Dynamo.Wpf.Nodes.DirectoryNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.DirectoryNodeViewCustomization
-
Dynamo.Wpf.Nodes.DoubleInputNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.DoubleInputNodeViewCustomization
-
Dynamo.Wpf.Nodes.DropDownNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.DropDownNodeViewCustomization
-
Dynamo.Wpf.Nodes.DummyNodeNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.DummyNodeNodeViewCustomization
-
Dynamo.Wpf.Nodes.FormulaNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.FormulaNodeViewCustomization
-
Dynamo.Wpf.Nodes.SelectionBaseNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.SelectionBaseNodeViewCustomization
-
Dynamo.Wpf.Nodes.StringInputNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.StringInputNodeViewCustomization
-
Dynamo.Wpf.Nodes.WatchNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.WatchNodeViewCustomization
-
Dynamo.Wpf.Nodes.WatchImageNodeViewCustomization
is nowCoreNodeModelsWpf.Nodes.WatchImageNodeViewCustomization
-
- The
Dynamo.Wpf.NodeViewCustomizations
namespace has been removed toCoreNodeModelsWpf.NodeViewCustomizations
-
Dynamo.Wpf.NodeViewCustomizations.ConverterNodeViewCustomization
is nowCoreNodeModelsWpf.NodeViewCustomizations.ConverterNodeViewCustomization
-
Dynamo.Wpf.NodeViewCustomizations.DateTimeNodeViewCustomization
is nowCoreNodeModelsWpf.NodeViewCustomizations.DateTimeNodeViewCustomization
-
Dynamo.Wpf.NodeViewCustomizations.DoubleSliderNodeViewCustomization
is nowCoreNodeModelsWpf.NodeViewCustomizations.DoubleSliderNodeViewCustomization
-
Dynamo.Wpf.NodeViewCustomizations.IntegerSliderNodeViewCustomization
is nowCoreNodeModelsWpf.NodeViewCustomizations.IntegerSliderNodeViewCustomization
-
- The
-
PythonNodeModelsWpf.ScriptEditorWindow
now requires three arguments
- Public constructors have been added to
MeasurementInputBase
to facilitate serialization.
Looking for help with using the Dynamo application? Try dynamobim.org.
- Dynamo 2.0 Language Changes Explained
- How Replication and Replication Guide work: Part 1
- How Replication and Replication Guide work: Part 2
- How Replication and Replication Guide work: Part 3