-
Notifications
You must be signed in to change notification settings - Fork 665
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.
-
IsBackgroundPreviewActiveinPreferenceSettings.csis obsolete now. Please useBackgroundPreviews. -
IPreviewBubblePreferenceis removed. -
IBackGroundPreviewPreferenceis removed. -
BackgroundPreviewsis added toIPreferencesinterface. -
ShowPreviewBubblesis added toIPreferencesinterface. -
GetIsBackGroundPreviewActive(string)is added toIPreferencesinterface.
-
CreationNameproperty added toCustomNodeSearchElement.cs. This returns a name using which this node can be created -
FullNameproperty inNodeSearchElement.csisvirtual propertynow.
-
DefaultValueStringproperty added toTypedParameter.cs. Use this to get string representation of AST node -
Dynamo.Library.TypedParameter.ToCommentNameStringreplacesToNameString. -
Dynamo.Library.TypedParameterconstructor is changed to take an optional summary string.
-
NodeCommands.ValidateConnectionsCommandhas been removed. -
DynamoModel.DynamoReadyevent is added. -
DynamoPreferencesDataclass is added toDynamoModel.cs. This class contains the extra Dynamo-specific preferences data -
RequestWorkspaceBackUpSaveevent added toDynamoModel.cs. This event occurs when a workspace is scheduled to be saved to a backup file -
WorkspaceOpeningevent inDynamoModel.cstakesobjectinstead ofXMLElement. -
HostVersionandHostNameproperties added toDynamoModel.cs.
-
PythonTemplateFilePathproperty is added toPathManager.cs -
CustomNodeManager(..)hasLibraryServices libraryServicesas an option. ex:CustomNodeManager(NodeFactory nodeFactory, MigrationManager migrationManager, LibraryServices libraryServices) -
TryGetCustomNodeData(..),CreateCustomNodeInstance(..)are added toCustomNodeManager.cs
- The property
NodeMigrationAttribute.Tohas been removed. - The property
NodeMigrationAttribute.Fromhas been renamed toNodeMigrationAttribute.Version.
-
ExtensionLoader.ExtensionLoadingevent was added. -
Dynamo.Extensions.IExtensionSourcewas added - this interface backs objects which can load other extensions. -
Dynamo.Extensions.ReadyParams.StartupParamswas added. -
ExtensionManager classhas new methods -RegisterService(), UnregisterService(), GetService(..)
- The
LibraryServices.GetFunctionDescriptormethod has been made public. -
CompilationServices(..)takesLibraryServicesinstead ofProtoCore.Core. -
IsLacingDisabledproperty 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.Nonewas added. -
UndoRedoRecorder.RecordModelAsOffTrack(Guid)was removed.
-
Workspace: -
XandY,Zoom,Height,WidthonWorkspaceModelhave been made obsolete and should be retrieved via theWorkspaceViewModelinstead as these are view properties. -
XandYandZoomonNodeModelhave been made obsolete and should be retrieved via theNodeViewModelinstead as these are view properties. -
CanUndoandCanRedoremoved fromWorkspaceModel.cs -
The
DynamoModel.AddWorkspacemethod has been made public. -
A new constructor was added for
WorkspaceInfoto facilitate deserialization. -
A new constructor is added for
HomeWorkspaceModelto facilitate deserialization. -
The
DSFunction.FunctionNameproperty is added to facilitate serialization. -
The
VariableInputNode.VariableInputPortsproperty 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.IsCustomNodeandFunction.FunctionUuidproperties have been added to facilitate serialization. -
WorkspaceModel.savenow returns void. -
constructor
HomeWorkspaceModel(...)added toHomeWorkspaceModel.cs -
SerializationExtensions.csclass is added to facilitate serializing a WorkspaceModel to json -
UndoRedo.csclass is added toWorkspaceModel. -
WorkspaceInfo(..)constructor added toWorkspaceInfo.cs. -
ScaleFactorproperty added toWorkspaceInfo.cs. -
ExtraWorkspaceViewInfo,ExtraNodeViewInfoExtraNoteViewInfo,ExtraAnnotationViewInfoclass added toWorkspaceModel.cs. This is a Non view-specific container for additional view information required to fully construct a WorkspaceModel from JSON -
Dependenciesproperty is added toWorkspaceModel.cs. This gathers the direct workspace dependencies of this workspace -
Annotationsis 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 classhas been added to provide theWorkspaceModel.ToJson(...)extension method -
DynamoModel.SaveWorkspaceis removed. UseWorkspaceModel.Saveinstead. -
WorkspaceModel.WorkspaceSavedevent is nowWorkspaceModel.Saved
NodeModel:
-
NodeModel.HasInput(...)has been removed. UsePortModel.IsConnectedinstead. -
NodeModel.ValidateConnections()has been removed. -
NodeModel.RegisterInputPorts()is nowNodeModel.RegisterInputPorts(IEnumerable<PortData> portDatas). ButNodeModel.RegisterInputPortsis deprecated. Please use theInPortNamesAttribute,InPortDescriptionsAttribute, andInPortTypesAttributeinstead. -
NodeModel.RegisterOutputPorts()is nowNodeModel.RegisterOutputPorts(IEnumerable<PortData> portDatas). ButNodeModel.RegisterOutputPorts()is deprecated. Please use theOutPortNamesAttribute,OutPortDescriptionsAttribute, andOutPortTypesAttributeinstead. -
NodeModel.AddPort(...)has been removed. Ports can now be added usingNodeModel.InPorts.Add(...)andNodeModel.OutPorts.Add(...) -
The
PortModel.Dataproperty has been removed. -
The
PortModel.ToolTipContentproperty is nowPortModel.ToolTip. -
PortModel.DefaultValueEnabledhas been removed. Please usePortModel.DefaultValue == nullto check whether a port has a default value. -
NodeInputData.csclass is added to Nodes. -
NodeOutputData.csclass is added to Nodes. -
NodeOutPutTypesenum is added for supported output data types. -
Statement.GetDefinedVariableNameshas a boolean parameter removed. -
Variable.NameWithIndexwas added. -
IsUpstreamVisible,OverrideNameWithNickNameare removed fromNodeModel.cs.DictionaryLinkproperty added toNodeModel.cs. -
SetNickNameFromAttribute()changed toSetNameFromNodeNameAttribute()inNodeModel.cs. -
ClearRuntimeError()changed toClearErrorsAndWarnings()inNodeModel.cs. -
ValidateConnections()is removed fromNodeModel.cs. -
PortNameproperty is nowNameproperty inPortModel.cs. -
ToolTipContentproperty is nowToolTipinPortModel.cs. -
ShouldKeepListStructureis nowKeepListStructureinPortModel.cs. -
IsOutPutNodeandIsSetAsOutputare added toNodeModel -
OutputDatais added toNodeModel
Other Models:
-
Many properties now include attributes from Json.net.
-
AnnotationModelhas been made Obsolete should be retrieved via theWorkspaceViewModelinstead. -
AnnotationModel.SelectedModelsis changed toAnnotationModel.Nodes -
PresetModelhas been made obsolete. -
TextMaxWidthproperty is added toAnnotationModel.cs -
ConnectorModel(PortModel start, PortModel end, Guid guid)constructor is added toConnectorModel.cs. -
ShouldSerializeX()andShouldSerializeY()added toModelBase.cs.Guidproperty inModelBase.csis 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 -
OriginalNodeContentinDummyNode.csreturnsobjectinstead ofXMLElement. -
NickNameis changed toNameinFunctionCallNodeController.cs. -
FunctionSignatureproperty is added toDSFunction.csandDSVarArgFunction.cs. Also,DSVarArgFunction.cshasFunctionTypeproperty added. -
LayoutExtensions.csclass is added to Workspaces. This contains methods for organizing graphs. -
NodeReadConverter,WorkspaceReadConverter,WorkspaceWriteConverter,DummyNodeWriteConverter,ConnectorConverter,IdToGuidConverter,TypedParameterConverter,IdReferenceResolverare added to the new classSerializationConverters.cs. -
CodeBlockNodeModel.TempVariablesandIsTempIdentiferare removed. -
CodeBlockNodeModel.LoadAndCreateConnectorssignature has changed to accept aSaveContextparameter. -
Dynamo.Updates.IHostManagerfolded intoIUpdateManager.
-
DynamoView.LibraryCollapsedis added. -
DynamoView.GetUniqueAddOnCategoriesis added. -
ShowHideConsoleMenuConverteris removed. -
SHowHidePreviewBubblesConverteris removed. -
DefaultWatchHandler.ProcessandProcessThingnow accept a new parameter - a preferred Dictionary ordering of keys names. -
IWatchHandlerinterface is updated with new process signature. -
GenerateWatchViewModelForData()is updated with new signature accepting preferred ordering of keys. -
WatchHandlerCallbackinvokeandbeginInvokeupdated with new signature accepting preferred ordering of keys. -
DynamoViewModel.TogglePreviewBubbleShowingCommandis removed. -
NodeViewModel.IsOuputis added. -
NodeViewModel.IsSetAsOutputis added. -
Dynamo.Wpf.Extensions.IViewExtensionSourceis added. -
Dynamo.Wpf.Extensions.ViewExtensionLoader.ExtensionLoadingevent is added. -
Dynamo.wpf.Extensions.ViewLoadedParams.ViewStartupParamsis added. -
Dynamo.Wpf.ViewModels.Watch3d.CameraData.Equalsis added. -
Dynamo.Wpf.ViewModesl.Watch3d.IWatchPreferencePropertiesfolded 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
CombinatorNodetypes to facilitate serialization.
- All classes in CoreNodeModelsWpf in Dynamo.Wpf moved to CoreNodeModelsWpf namespace
- The
Dynamo.Wpfnamespace has been removed toCoreNodeModelsWpf-
Dynamo.Wpf.DoubleSliderSettingsControlis nowCoreNodeModelsWpf.DoubleSliderSettingsControl -
Dynamo.Wpf.ElementSelectionControlis nowCoreNodeModelsWpf.ElementSelectionControl -
Dynamo.Wpf.IntegerSliderSettingsControlis nowCoreNodeModelsWpf.IntegerSliderSettingsControl -
Dynamo.Wpf.ConverterViewModelis nowCoreNodeModelsWpf.ConverterViewModel -
Dynamo.Wpf.SliderViewModel<T>is nowCoreNodeModelsWpf.SliderViewModel<T>
-
- The
Dynamo.Wpf.Controlsnamespace has been removed toCoreNodeModelsWpf.Controls-
Dynamo.Wpf.Controls.DateTimeInputControlis nowCoreNodeModelsWpf.Controls.DateTimeInputControl -
Dynamo.Wpf.Controls.DynamoConverterControlis nowCoreNodeModelsWpf.Controls.DynamoConverterControl -
Dynamo.Wpf.Controls.DynamoSlideris nowCoreNodeModelsWpf.Controls.DynamoSlider
-
- The
Dynamo.Wpf.Convertersnamespace has been removed toCoreNodeModelsWpf.Converters-
Dynamo.Wpf.Converters.SelectionButtonContentConverteris nowCoreNodeModelsWpf.SelectionButtonContentConverter -
Dynamo.Wpf.Converters.StringToDateTimeConverteris nowCoreNodeModelsWpf.Converters.StringToDateTimeConverter
-
- The
Dynamo.Wpf.Nodesnamespace has been removed toCoreNodeModelsWpf.Nodes-
Dynamo.Wpf.Nodes.BoolSelectorNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.BoolSelectorNodeViewCustomization -
Dynamo.Wpf.Nodes.ColorRangeNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.ColorRangeNodeViewCustomization -
Dynamo.Wpf.Nodes.CreateListNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.CreateListNodeViewCustomization -
Dynamo.Wpf.Nodes.DirectoryNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.DirectoryNodeViewCustomization -
Dynamo.Wpf.Nodes.DoubleInputNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.DoubleInputNodeViewCustomization -
Dynamo.Wpf.Nodes.DropDownNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.DropDownNodeViewCustomization -
Dynamo.Wpf.Nodes.DummyNodeNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.DummyNodeNodeViewCustomization -
Dynamo.Wpf.Nodes.FormulaNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.FormulaNodeViewCustomization -
Dynamo.Wpf.Nodes.SelectionBaseNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.SelectionBaseNodeViewCustomization -
Dynamo.Wpf.Nodes.StringInputNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.StringInputNodeViewCustomization -
Dynamo.Wpf.Nodes.WatchNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.WatchNodeViewCustomization -
Dynamo.Wpf.Nodes.WatchImageNodeViewCustomizationis nowCoreNodeModelsWpf.Nodes.WatchImageNodeViewCustomization
-
- The
Dynamo.Wpf.NodeViewCustomizationsnamespace has been removed toCoreNodeModelsWpf.NodeViewCustomizations-
Dynamo.Wpf.NodeViewCustomizations.ConverterNodeViewCustomizationis nowCoreNodeModelsWpf.NodeViewCustomizations.ConverterNodeViewCustomization -
Dynamo.Wpf.NodeViewCustomizations.DateTimeNodeViewCustomizationis nowCoreNodeModelsWpf.NodeViewCustomizations.DateTimeNodeViewCustomization -
Dynamo.Wpf.NodeViewCustomizations.DoubleSliderNodeViewCustomizationis nowCoreNodeModelsWpf.NodeViewCustomizations.DoubleSliderNodeViewCustomization -
Dynamo.Wpf.NodeViewCustomizations.IntegerSliderNodeViewCustomizationis nowCoreNodeModelsWpf.NodeViewCustomizations.IntegerSliderNodeViewCustomization
-
- The
-
PythonNodeModelsWpf.ScriptEditorWindownow requires three arguments
- Public constructors have been added to
MeasurementInputBaseto 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