diff --git a/.gitignore b/.gitignore index 4de66ab2818..849dd5651d5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ runtimeGeneratedExtension/ obj/ int/ packages/ +bin/ #find -type d -name bin -exec git rm -r {} \; diff --git a/doc/distrib/NodeHelpFiles/CoreNodeModels.FormattedStringFromArray.md b/doc/distrib/NodeHelpFiles/CoreNodeModels.FormattedStringFromArray.md new file mode 100644 index 00000000000..76a62492255 --- /dev/null +++ b/doc/distrib/NodeHelpFiles/CoreNodeModels.FormattedStringFromArray.md @@ -0,0 +1,17 @@ +## In Depth +This node will convert an oject to a string. The second input `format specifier` controls how numeric inputs are converted to their string representations. +This `format specifier` inputs should be one of the c# standard format numeric specifiers. + +format specifiers should be in the form: +`` for example F1 + +Some commonly used format specifiers are: +``` +G : general formatting G 1000.0 -> "1000" +F : fixed point notation F4 1000.0 -> "1000.0000" +N : number N2 1000 -> "1,000.00" +``` + +The default for this node is `G`, which will output a compact, but variable representation. + +[see the microsoft documentation for more detailed information.](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#standard-format-specifiers) diff --git a/doc/distrib/NodeHelpFiles/CoreNodeModels.FormattedStringFromObject.md b/doc/distrib/NodeHelpFiles/CoreNodeModels.FormattedStringFromObject.md new file mode 100644 index 00000000000..76a62492255 --- /dev/null +++ b/doc/distrib/NodeHelpFiles/CoreNodeModels.FormattedStringFromObject.md @@ -0,0 +1,17 @@ +## In Depth +This node will convert an oject to a string. The second input `format specifier` controls how numeric inputs are converted to their string representations. +This `format specifier` inputs should be one of the c# standard format numeric specifiers. + +format specifiers should be in the form: +`` for example F1 + +Some commonly used format specifiers are: +``` +G : general formatting G 1000.0 -> "1000" +F : fixed point notation F4 1000.0 -> "1000.0000" +N : number N2 1000 -> "1,000.00" +``` + +The default for this node is `G`, which will output a compact, but variable representation. + +[see the microsoft documentation for more detailed information.](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#standard-format-specifiers) diff --git a/doc/distrib/NodeHelpFiles/CoreNodeModels.Input.ColorPalette.dyn b/doc/distrib/NodeHelpFiles/CoreNodeModels.Input.ColorPalette.dyn new file mode 100644 index 00000000000..e14145e67cf --- /dev/null +++ b/doc/distrib/NodeHelpFiles/CoreNodeModels.Input.ColorPalette.dyn @@ -0,0 +1,361 @@ +{ + "Uuid": "a2ce429c-eb89-45ae-8018-5f3ae7cf8a4b", + "IsCustomNode": false, + "Description": "", + "Name": "CoreNodeModels.Input.ColorPalette", + "ElementResolver": { + "ResolutionMap": {} + }, + "Inputs": [], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "CoreNodeModels.Input.ColorPalette, CoreNodeModels", + "InputValue": { + "R": 0, + "G": 204, + "B": 204, + "A": 255 + }, + "Id": "2368b3bba4574510b7944d0bee831dbd", + "NodeType": "ColorInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "a2c97e14e00245949ca74c6cdcf13a71", + "Name": "Color", + "Description": "Selected Color.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Select a Color from the palette" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "0fdd523c73ef4aa7a350d90c5cda3cf6", + "NodeType": "FunctionNode", + "Inputs": [ + { + "Id": "ea0400311c194b7f80f2bcea0ce39346", + "Name": "color", + "Description": "A color object\n\nColor", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "f6a39c777a81443cb6d3100cb4b14d70", + "Name": "alpha", + "Description": "Alpha value, int between 0 and 255 inclusive.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "ccd4c2423042499096fc2b180e104cb6", + "Name": "red", + "Description": "Red value for RGB color model, int between 0 and 255 inclusive.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "367d6a1141a94d68bbec036f1c263272", + "Name": "green", + "Description": "Green value for RGB color model, int between 0 and 255 inclusive.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "763241133ecc46288d63335174ea28cb", + "Name": "blue", + "Description": "Blue value for RGB color model, int between 0 and 255 inclusive.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "FunctionSignature": "DSCore.Color.Components@DSCore.Color", + "Replication": "Auto", + "Description": "Lists the components for the color in the order: alpha, red, green, blue.\n\nColor.Components (color: Color): var[]..[]" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 42.5, + "WatchHeight": 38.0, + "Id": "c5aaffd3f4b64ee694568969d6a95201", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "a3f1b67a242447728b685e679b782400", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "4e35c55a605f4ba99b4f7041c73693c4", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 27.5, + "WatchHeight": 38.0, + "Id": "c9c4441cd7ff4b8e943c86e5f42905ef", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "037c7b14beb24bd09b4e20c507f25e5e", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "f7da5c287f7d4cc79ff61649918fc13c", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 42.5, + "WatchHeight": 38.0, + "Id": "4a45a51fa26542a78436270d63ab41e9", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "fb4465ad8b56477d8e421177d05496eb", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "a1c12631922548e7aaa22d1156475f1d", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 42.5, + "WatchHeight": 38.0, + "Id": "5bc9cf594db3436fbf9ec60ae64fd801", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "40186e8ef02b45df90e3bc01b23f86f7", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "c1be6f903f1941ad82d454acce94fb34", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + } + ], + "Connectors": [ + { + "Start": "a2c97e14e00245949ca74c6cdcf13a71", + "End": "ea0400311c194b7f80f2bcea0ce39346", + "Id": "766c77ef51184ee6a31f993482890ecb", + "IsHidden": "False" + }, + { + "Start": "f6a39c777a81443cb6d3100cb4b14d70", + "End": "a3f1b67a242447728b685e679b782400", + "Id": "2b1ec511614647e28d4fce5cee890abd", + "IsHidden": "False" + }, + { + "Start": "ccd4c2423042499096fc2b180e104cb6", + "End": "037c7b14beb24bd09b4e20c507f25e5e", + "Id": "cca5bb9a987042149deb352f3a173077", + "IsHidden": "False" + }, + { + "Start": "367d6a1141a94d68bbec036f1c263272", + "End": "fb4465ad8b56477d8e421177d05496eb", + "Id": "95b480397d7e44d0b83421a00cf8b985", + "IsHidden": "False" + }, + { + "Start": "763241133ecc46288d63335174ea28cb", + "End": "40186e8ef02b45df90e3bc01b23f86f7", + "Id": "59e4e8b3c1804346968809d5fa70ebac", + "IsHidden": "False" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "EnableLegacyPolyCurveBehavior": null, + "Thumbnail": "", + "GraphDocumentationURL": null, + "ExtensionWorkspaceData": [ + { + "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670", + "Name": "Properties", + "Version": "3.5", + "Data": {} + } + ], + "Author": "", + "Linting": { + "activeLinter": "None", + "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a", + "warningCount": 0, + "errorCount": 0 + }, + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": true, + "IsVisibleInDynamoLibrary": true, + "Version": "3.5.0.6812", + "RunType": "Automatic", + "RunPeriod": "1000" + }, + "Camera": { + "Name": "_Background Preview", + "EyeX": -17.0, + "EyeY": 24.0, + "EyeZ": 50.0, + "LookX": 12.0, + "LookY": -13.0, + "LookZ": -58.0, + "UpX": 0.0, + "UpY": 1.0, + "UpZ": 0.0 + }, + "ConnectorPins": [], + "NodeViews": [ + { + "Id": "2368b3bba4574510b7944d0bee831dbd", + "Name": "Color Palette", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 248.5, + "Y": 302.0 + }, + { + "Id": "0fdd523c73ef4aa7a350d90c5cda3cf6", + "Name": "Color.Components", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 549.5, + "Y": 301.0 + }, + { + "Id": "c5aaffd3f4b64ee694568969d6a95201", + "Name": "Watch", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 857.375, + "Y": 291.0 + }, + { + "Id": "c9c4441cd7ff4b8e943c86e5f42905ef", + "Name": "Watch", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 854.875, + "Y": 162.0 + }, + { + "Id": "4a45a51fa26542a78436270d63ab41e9", + "Name": "Watch", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 857.875, + "Y": 420.5 + }, + { + "Id": "5bc9cf594db3436fbf9ec60ae64fd801", + "Name": "Watch", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 858.875, + "Y": 553.5 + } + ], + "Annotations": [], + "X": -27.0, + "Y": -64.5, + "Zoom": 1.0 + } +} \ No newline at end of file diff --git a/doc/distrib/NodeHelpFiles/DynamoUnits.Utilities.ConvertByUnits.dyn b/doc/distrib/NodeHelpFiles/DynamoUnits.Utilities.ConvertByUnits.dyn new file mode 100644 index 00000000000..9bb6a28bdb1 --- /dev/null +++ b/doc/distrib/NodeHelpFiles/DynamoUnits.Utilities.ConvertByUnits.dyn @@ -0,0 +1,281 @@ +{ + "Uuid": "e8bda09f-70de-4d9f-af2c-573a192fea1c", + "IsCustomNode": false, + "Description": "", + "Name": "DynamoUnits.Utilities.ConvertByUnits", + "ElementResolver": { + "ResolutionMap": {} + }, + "Inputs": [], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "b31034bd8a6647a2a34a805ac0110574", + "NodeType": "FunctionNode", + "Inputs": [ + { + "Id": "820d25520c2c43bf901d89717bb4449a", + "Name": "value", + "Description": "Value to convert\n\ndouble", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "a0ef2c27c12845d4a6ba8db8a8aa82d7", + "Name": "fromUnit", + "Description": "Unit object\n\nUnit", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "70a2be62799c4478bf832df406399be5", + "Name": "toUnit", + "Description": "Unit object\n\nUnit", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "3d506f13921f421d88040371077915e7", + "Name": "double", + "Description": "Converted value", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "FunctionSignature": "DynamoUnits.Utilities.ConvertByUnits@double,DynamoUnits.Unit,DynamoUnits.Unit", + "Replication": "Auto", + "Description": "Converts a value from one Unit System to another Unit System\n\nUtilities.ConvertByUnits (value: double, fromUnit: Unit, toUnit: Unit): double" + }, + { + "ConcreteType": "CoreNodeModels.Input.DoubleInput, CoreNodeModels", + "NumberType": "Double", + "Id": "fb2a765e332e4fa4854a38a315656064", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "f01978ee48c74bf2a2f8abad1ad2ed27", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Creates a number", + "InputValue": 5.5 + }, + { + "ConcreteType": "UnitsUI.Units, UnitsNodeModels", + "SelectedIndex": 77, + "SelectedString": "Feet", + "Id": "789ba591a7354579b97e43effb0c4a8c", + "NodeType": "ExtensionNode", + "Inputs": [], + "Outputs": [ + { + "Id": "55a2f95af09742cead063199ab2debf5", + "Name": "Unit", + "Description": "The selected Unit", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Select a Unit type" + }, + { + "ConcreteType": "UnitsUI.Units, UnitsNodeModels", + "SelectedIndex": 211, + "SelectedString": "Meters", + "Id": "f6acc007aff84b0b95ff748b122a3ba1", + "NodeType": "ExtensionNode", + "Inputs": [], + "Outputs": [ + { + "Id": "4764fdb701994f9d81f139c9d113ee91", + "Name": "Unit", + "Description": "The selected Unit", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Select a Unit type" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 155.0, + "WatchHeight": 38.0, + "Id": "b631402b019e4e4ebb4fc77e4a55ca86", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "8e8682ab8baa4c50a3b4036de0419392", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "cb2893c1c422453c82e9d7163eaf3f90", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + } + ], + "Connectors": [ + { + "Start": "3d506f13921f421d88040371077915e7", + "End": "8e8682ab8baa4c50a3b4036de0419392", + "Id": "cd51087ad7eb43b4a885cac29a2f805e", + "IsHidden": "False" + }, + { + "Start": "f01978ee48c74bf2a2f8abad1ad2ed27", + "End": "820d25520c2c43bf901d89717bb4449a", + "Id": "01b441959d844df6bd52129bb275d0f1", + "IsHidden": "False" + }, + { + "Start": "55a2f95af09742cead063199ab2debf5", + "End": "a0ef2c27c12845d4a6ba8db8a8aa82d7", + "Id": "26f00b3bc82f4426872fdf2d7c6d5eac", + "IsHidden": "False" + }, + { + "Start": "4764fdb701994f9d81f139c9d113ee91", + "End": "70a2be62799c4478bf832df406399be5", + "Id": "9c6522d1ff614465b39445a536bf4d87", + "IsHidden": "False" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "EnableLegacyPolyCurveBehavior": true, + "Thumbnail": "", + "GraphDocumentationURL": null, + "ExtensionWorkspaceData": [ + { + "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670", + "Name": "Properties", + "Version": "3.5", + "Data": {} + } + ], + "Author": "", + "Linting": { + "activeLinter": "None", + "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a", + "warningCount": 0, + "errorCount": 0 + }, + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": true, + "IsVisibleInDynamoLibrary": true, + "Version": "3.5.0.6812", + "RunType": "Automatic", + "RunPeriod": "1000" + }, + "Camera": { + "Name": "_Background Preview", + "EyeX": -17.0, + "EyeY": 24.0, + "EyeZ": 50.0, + "LookX": 12.0, + "LookY": -13.0, + "LookZ": -58.0, + "UpX": 0.0, + "UpY": 1.0, + "UpZ": 0.0 + }, + "ConnectorPins": [], + "NodeViews": [ + { + "Id": "b31034bd8a6647a2a34a805ac0110574", + "Name": "Utilities.ConvertByUnits", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 413.0, + "Y": 216.0 + }, + { + "Id": "fb2a765e332e4fa4854a38a315656064", + "Name": "Number", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 145.0, + "Y": 109.0 + }, + { + "Id": "789ba591a7354579b97e43effb0c4a8c", + "Name": "Units", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 116.5, + "Y": 250.0 + }, + { + "Id": "f6acc007aff84b0b95ff748b122a3ba1", + "Name": "Units", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 117.0, + "Y": 383.5 + }, + { + "Id": "b631402b019e4e4ebb4fc77e4a55ca86", + "Name": "Watch", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 724.5, + "Y": 242.0 + } + ], + "Annotations": [], + "X": 0.0, + "Y": 0.0, + "Zoom": 1.0 + } +} \ No newline at end of file diff --git a/doc/distrib/NodeHelpFiles/LMVGRWYVOONMRPCSD3NCYVD776V33DFYWXC2F5S3KREHPOX5A2FA.dyn b/doc/distrib/NodeHelpFiles/LMVGRWYVOONMRPCSD3NCYVD776V33DFYWXC2F5S3KREHPOX5A2FA.dyn new file mode 100644 index 00000000000..abe173e9e73 --- /dev/null +++ b/doc/distrib/NodeHelpFiles/LMVGRWYVOONMRPCSD3NCYVD776V33DFYWXC2F5S3KREHPOX5A2FA.dyn @@ -0,0 +1,445 @@ +{ + "Uuid": "2e5385d9-99ed-4748-bdfa-55fdebe34099", + "IsCustomNode": false, + "Description": "", + "Name": "LMVGRWYVOONMRPCSD3NCYVD776V33DFYWXC2F5S3KREHPOX5A2FA", + "ElementResolver": { + "ResolutionMap": { + "Autodesk.DesignScript.Geometry.Vector": { + "Key": "Autodesk.DesignScript.Geometry.Vector", + "Value": "ProtoGeometry.dll" + } + } + }, + "Inputs": [ + { + "Id": "da68fd354c2a430299c17732c1732b18", + "Name": "Number Slider", + "Type": "number", + "Type2": "number", + "Value": "10", + "MaximumValue": 10.0, + "MinimumValue": 1.0, + "StepValue": 0.1, + "NumberType": "Double", + "Description": "Produces numeric values" + }, + { + "Id": "b656d002ffe54c8a8ebb56ef899a2dab", + "Name": "Number Slider", + "Type": "number", + "Type2": "number", + "Value": "15", + "MaximumValue": 15.0, + "MinimumValue": 1.0, + "StepValue": 0.1, + "NumberType": "Double", + "Description": "Produces numeric values" + } + ], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels", + "NumberType": "Double", + "MaximumValue": 10.0, + "MinimumValue": 1.0, + "StepValue": 0.1, + "Id": "da68fd354c2a430299c17732c1732b18", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "a3b27e266dfd410faefcf9ef75eab910", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Produces numeric values", + "InputValue": 10.0 + }, + { + "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels", + "NumberType": "Double", + "MaximumValue": 15.0, + "MinimumValue": 1.0, + "StepValue": 0.1, + "Id": "b656d002ffe54c8a8ebb56ef899a2dab", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "5813011ef0b14998bd6e120b2ae74b7b", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Produces numeric values", + "InputValue": 15.0 + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "b6a4f0ab1f414ec7bc3515f3389da552", + "NodeType": "FunctionNode", + "Inputs": [ + { + "Id": "65238ef7d46e4bcfa2015b1b79299ebb", + "Name": "coordinateSystem", + "Description": "Coordinate system of rectangle (center of rectangle)\n\nCoordinateSystem\nDefault value : Autodesk.DesignScript.Geometry.CoordinateSystem.ByOrigin(0, 0, 0)", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "5458ea218f234a3496e763b0679e8333", + "Name": "width", + "Description": "Width of rectangle\n\ndouble\nDefault value : 1", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "c9578dd8006249979be3229a002dc13c", + "Name": "length", + "Description": "Length of rectangle\n\ndouble\nDefault value : 1", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "2976a3c6d0404f0d85babd194d6deba8", + "Name": "Rectangle", + "Description": "Rectangle created from width and length", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.Rectangle.ByWidthLength@Autodesk.DesignScript.Geometry.CoordinateSystem,double,double", + "Replication": "Auto", + "Description": "Create a Rectangle centered at the input origin in the CoordinateSystem XY Plane, with specified width (X Axis length), and length (Y Axis length).\n\nRectangle.ByWidthLength (coordinateSystem: CoordinateSystem = Autodesk.DesignScript.Geometry.CoordinateSystem.ByOrigin(0, 0, 0), width: double = 1, length: double = 1): Rectangle" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "048bac1ef715432b94305a49b70d2319", + "NodeType": "FunctionNode", + "Inputs": [ + { + "Id": "9cc559768ef8433cb22ffc579b2f082d", + "Name": "x", + "Description": "double\nDefault value : 0", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "aa76c7fb20d2432fad0cdcd467ddad26", + "Name": "y", + "Description": "double\nDefault value : 0", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "04f74c5bcd514369a7f1d54a3cd5574c", + "Name": "z", + "Description": "double\nDefault value : 0", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "c80645569d0d45da83e115658e493e94", + "Name": "CoordinateSystem", + "Description": "CoordinateSystem", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.CoordinateSystem.ByOrigin@double,double,double", + "Replication": "Auto", + "Description": "Create a CoordinateSystem with origin at X, Y, and Z locations, with X and Y Axes set as WCS X and Y Axes.\n\nCoordinateSystem.ByOrigin (x: double = 0, y: double = 0, z: double = 0): CoordinateSystem" + }, + { + "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels", + "NumberType": "Double", + "MaximumValue": 100.0, + "MinimumValue": 0.0, + "StepValue": 0.1, + "Id": "530e75162e5d46248b56e37b6bc1e360", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "d6f0b96c7c4f4b0780128ce0a684bd6b", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Produces numeric values", + "InputValue": 3.0 + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 332.5, + "WatchHeight": 97.0, + "Id": "63bb51b403ac46e882a868d308da44bd", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "f97b8d2e7fb14a8fb76be78b4c191ef7", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "db6ca2f5bc5c4fc095d535dc13ea4238", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "Watch3DNodeModels.Watch3D, Watch3DNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "WasExecuted": true, + "Camera": { + "Name": "3030eb2d-4cb0-45ad-b3a8-a3ed02f1b413 Preview", + "EyeX": -17.0, + "EyeY": 24.0, + "EyeZ": 50.0, + "LookX": 12.0, + "LookY": -13.0, + "LookZ": -58.0, + "UpX": 0.0, + "UpY": 1.0, + "UpZ": 0.0 + }, + "VariableInputPorts": true, + "Id": "568a80f523f040378306bdfbbdaa23c5", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "4d9733b0e00a476e8e1c29879dc2f99a", + "Name": "", + "Description": "Incoming geometry objects.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "d4f334b2d79148a896c6769419ff5786", + "Name": "", + "Description": "Incoming geometry objects.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Shows a dynamic preview of geometry" + } + ], + "Connectors": [ + { + "Start": "a3b27e266dfd410faefcf9ef75eab910", + "End": "5458ea218f234a3496e763b0679e8333", + "Id": "9cf5d5f4c99e485a97c59f864605cea3", + "IsHidden": "False" + }, + { + "Start": "5813011ef0b14998bd6e120b2ae74b7b", + "End": "c9578dd8006249979be3229a002dc13c", + "Id": "80b0d0ac080249fe9917066060da354f", + "IsHidden": "False" + }, + { + "Start": "2976a3c6d0404f0d85babd194d6deba8", + "End": "4d9733b0e00a476e8e1c29879dc2f99a", + "Id": "ab038143bb434525b671bbbaf1c3bf5a", + "IsHidden": "False" + }, + { + "Start": "2976a3c6d0404f0d85babd194d6deba8", + "End": "f97b8d2e7fb14a8fb76be78b4c191ef7", + "Id": "dbc63bf840f84d3fb39c236aea7509af", + "IsHidden": "False" + }, + { + "Start": "c80645569d0d45da83e115658e493e94", + "End": "65238ef7d46e4bcfa2015b1b79299ebb", + "Id": "ff8346f3ea784a7b832dd2e44806ac9c", + "IsHidden": "False" + }, + { + "Start": "d6f0b96c7c4f4b0780128ce0a684bd6b", + "End": "04f74c5bcd514369a7f1d54a3cd5574c", + "Id": "139aaae5c73b45ae8a9043501c947567", + "IsHidden": "False" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "EnableLegacyPolyCurveBehavior": true, + "Thumbnail": null, + "GraphDocumentationURL": null, + "ExtensionWorkspaceData": [ + { + "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670", + "Name": "Properties", + "Version": "3.5", + "Data": {} + } + ], + "Author": "None provided", + "Linting": { + "activeLinter": "None", + "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a", + "warningCount": 0, + "errorCount": 0 + }, + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": true, + "IsVisibleInDynamoLibrary": true, + "Version": "3.5.0.6812", + "RunType": "Automatic", + "RunPeriod": "1000" + }, + "Camera": { + "Name": "_Background Preview", + "EyeX": -3.759126663208008, + "EyeY": 3.1215903759002686, + "EyeZ": 3.2547216415405273, + "LookX": 3.282925844192505, + "LookY": -2.345578908920288, + "LookZ": -3.261296510696411, + "UpX": 0.17762959003448486, + "UpY": 0.9681476354598999, + "UpZ": -0.17645928263664246 + }, + "ConnectorPins": [], + "NodeViews": [ + { + "Id": "da68fd354c2a430299c17732c1732b18", + "Name": "Number Slider", + "IsSetAsInput": true, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -645.9986447230651, + "Y": -109.54675832816861 + }, + { + "Id": "b656d002ffe54c8a8ebb56ef899a2dab", + "Name": "Number Slider", + "IsSetAsInput": true, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -645.9986447230651, + "Y": 37.45324167183139 + }, + { + "Id": "b6a4f0ab1f414ec7bc3515f3389da552", + "Name": "Rectangle.ByWidthLength", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -167.3196282861618, + "Y": -243.2873800142769 + }, + { + "Id": "048bac1ef715432b94305a49b70d2319", + "Name": "CoordinateSystem.ByOrigin", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -645.9986447230651, + "Y": -322.5467583281686 + }, + { + "Id": "530e75162e5d46248b56e37b6bc1e360", + "Name": "Number Slider", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -1133.5079236202018, + "Y": -258.0338010110956 + }, + { + "Id": "63bb51b403ac46e882a868d308da44bd", + "Name": "Watch", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 240.23737065339333, + "Y": -281.5730374904167 + }, + { + "Id": "568a80f523f040378306bdfbbdaa23c5", + "Name": "Watch 3D", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 250.117540324655, + "Y": -65.44432593156216 + } + ], + "Annotations": [], + "X": 521.2395768912097, + "Y": 295.49522350690694, + "Zoom": 0.40485134700010733 + } +} \ No newline at end of file diff --git a/extern/ProtoGeometry/ProtoGeometry.config b/extern/ProtoGeometry/ProtoGeometry.config index 1304d2ad9d2..24ddf3c59c9 100644 --- a/extern/ProtoGeometry/ProtoGeometry.config +++ b/extern/ProtoGeometry/ProtoGeometry.config @@ -1,4 +1,4 @@ - libg_230_0_0/LibG.ProtoInterface.dll + libg_231_0_0/LibG.ProtoInterface.dll diff --git a/extern/TuneUp/bin/TuneUp.dll b/extern/TuneUp/bin/TuneUp.dll index 646dc924f75..0d39cf4d00e 100644 Binary files a/extern/TuneUp/bin/TuneUp.dll and b/extern/TuneUp/bin/TuneUp.dll differ diff --git a/extern/TuneUp/bin/en-US/TuneUp.resources.dll b/extern/TuneUp/bin/en-US/TuneUp.resources.dll index d778eaf665c..3c398e9fdb4 100644 Binary files a/extern/TuneUp/bin/en-US/TuneUp.resources.dll and b/extern/TuneUp/bin/en-US/TuneUp.resources.dll differ diff --git a/extern/TuneUp/pkg.json b/extern/TuneUp/pkg.json index b4df6c6dbdc..20fb2e7e0c5 100644 --- a/extern/TuneUp/pkg.json +++ b/extern/TuneUp/pkg.json @@ -1,24 +1,24 @@ { - "license": "MIT", - "file_hash": null, - "name": "TuneUp", - "version": "1.0.13", - "description": "On Dynamo 2.5–2.19 (.NET 4.8), use TuneUp versions up to 1.0.7.\r\nOn Dynamo 3.0+ (.NET 8), use TuneUp versions 1.0.8 and later.\r\n\r\nTuneUp is a view extension for analyzing the performance of Dynamo graphs. TuneUp allows you to see overall graph execution time, per-node execution time, execution time of groups, and other helpful information. With TuneUp, you can rerun all nodes, including ones that are normally skipped for optimization/caching during repeated runs of a graph. This enables you to compare the actual execution times between multiple runs. Read more here: https://dynamobim.org/tuneup-extension-explore-your-node-and-graph-execution-times/. \r\n\r\nKnown issues:\r\n1. TuneUp does not work in a custom node workspace.\r\n2. TuneUp does not work in a custom node workspace.", - "group": "", - "keywords": [ - "profiler", - "tuneup" - ], - "dependencies": [], - "host_dependencies": [], - "contents": "", - "engine_version": "3.0.0.7186", - "engine": "dynamo", - "engine_metadata": "", - "site_url": "https://dynamobim.org/", - "repository_url": "https://github.com/DynamoDS/TuneUp", - "contains_binaries": true, - "node_libraries": [], - "copyright_holder": "DynamoTeam", - "copyright_year": "2024" + "license": "MIT", + "file_hash": null, + "name": "TuneUp", + "version": "1.0.15", + "description": "On Dynamo 2.5–2.19 (.NET 4.8), use TuneUp versions up to 1.0.7.\r\nOn Dynamo 3.0+ (.NET 8), use TuneUp versions 1.0.8 and later.\r\n\r\nTuneUp is a view extension for analyzing the performance of Dynamo graphs. TuneUp allows you to see overall graph execution time, per-node execution time, execution time of groups, and other helpful information. With TuneUp, you can rerun all nodes, including ones that are normally skipped for optimization/caching during repeated runs of a graph. This enables you to compare the actual execution times between multiple runs. Read more here: https://dynamobim.org/tuneup-extension-explore-your-node-and-graph-execution-times/. \r\n\r\nKnown issues:\r\n1. TuneUp does not work in a custom node workspace.\r\n2. TuneUp binaries are not semantically versioned and are not intended to be built on top of as an API. Do not treat these binaries like DynamoCore.", + "group": "", + "keywords": [ + "profiler", + "tuneup" + ], + "dependencies": [], + "host_dependencies": [], + "contents": "", + "engine_version": "3.0.0.7186", + "engine": "dynamo", + "engine_metadata": "", + "site_url": "https://dynamobim.org/", + "repository_url": "https://github.com/DynamoDS/TuneUp", + "contains_binaries": true, + "node_libraries": [], + "copyright_holder": "DynamoTeam", + "copyright_year": "2024" } \ No newline at end of file diff --git a/src/DynamoCore/Configuration/PreferenceSettings.cs b/src/DynamoCore/Configuration/PreferenceSettings.cs index 88d8897b275..8dfbf926447 100644 --- a/src/DynamoCore/Configuration/PreferenceSettings.cs +++ b/src/DynamoCore/Configuration/PreferenceSettings.cs @@ -112,6 +112,10 @@ private readonly static Lazy /// public static readonly DateTime DynamoDefaultTime = new DateTime(1977, 4, 12, 12, 12, 0, 0); + internal static readonly IEnumerable InitialExperimentalLib_Namespaces = + [ + "ProtoGeometry.dll:Autodesk.DesignScript.Geometry.PanelSurface" + ]; #endregion // The following settings are persistent between Dynamo sessions and are user-controllable @@ -1186,11 +1190,7 @@ internal void InitializeNamespacesToExcludeFromLibrary() { if (!NamespacesToExcludeFromLibrarySpecified) { - NamespacesToExcludeFromLibrary = new List() - { - "ProtoGeometry.dll:Autodesk.DesignScript.Geometry.TSpline", - "ProtoGeometry.dll:Autodesk.DesignScript.Geometry.PanelSurface" - }; + NamespacesToExcludeFromLibrary = InitialExperimentalLib_Namespaces.ToList(); NamespacesToExcludeFromLibrarySpecified = true; } } diff --git a/src/DynamoCore/DynamoCore.csproj b/src/DynamoCore/DynamoCore.csproj index 096e2252a07..76e74049197 100644 --- a/src/DynamoCore/DynamoCore.csproj +++ b/src/DynamoCore/DynamoCore.csproj @@ -39,7 +39,7 @@ - + diff --git a/src/DynamoCore/Graph/Nodes/NodeModel.cs b/src/DynamoCore/Graph/Nodes/NodeModel.cs index 8131c81469a..084a2dd8030 100644 --- a/src/DynamoCore/Graph/Nodes/NodeModel.cs +++ b/src/DynamoCore/Graph/Nodes/NodeModel.cs @@ -2,17 +2,18 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Reflection; using System.Runtime.Serialization; using System.Xml; -using Autodesk.DesignScript.Runtime; using Dynamo.Configuration; using Dynamo.Engine; using Dynamo.Engine.CodeGeneration; using Dynamo.Graph.Connectors; using Dynamo.Graph.Nodes.CustomNodes; +using Dynamo.Graph.Nodes.ZeroTouch; using Dynamo.Graph.Workspaces; using Dynamo.Migration; using Dynamo.Scheduler; @@ -2869,6 +2870,22 @@ public bool ShouldDisplayPreview protected bool ShouldDisplayPreviewCore { get; set; } + [Experimental("NM_ISEXPERIMENTAL_GLPYH")] + internal bool IsExperimental + { + get + { + //TODO switch on model type? + if (this is DSFunction ztnm) + { + return ztnm.Controller.Definition.IsExperimental; + } + else + { + return TypeLoadData.CheckExperimentalFromAttribute(GetType()); + } + } + } public event Action RenderPackagesUpdated; private void OnRenderPackagesUpdated(RenderPackageCache packages) diff --git a/src/DynamoCore/Graph/Nodes/TypeLoadData.cs b/src/DynamoCore/Graph/Nodes/TypeLoadData.cs index 82dbca9e547..06d2cf0df42 100644 --- a/src/DynamoCore/Graph/Nodes/TypeLoadData.cs +++ b/src/DynamoCore/Graph/Nodes/TypeLoadData.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -95,6 +95,12 @@ public TypeLoadData(Type typeIn) OutputParameters = Type.GetCustomAttributes(false) .SelectMany(x => x.PortTypes); + IsExperimental = CheckExperimentalFromAttribute(Type); + } + + internal static bool CheckExperimentalFromAttribute(System.Type type) + { + return type.GetCustomAttributes(false).Any(); } /// @@ -166,5 +172,9 @@ public string Category /// Indicates output parameters. /// public readonly IEnumerable OutputParameters; + /// + /// Is this type experimental/unstable. + /// + internal bool IsExperimental; } } diff --git a/src/DynamoCore/Library/FunctionDescriptor.cs b/src/DynamoCore/Library/FunctionDescriptor.cs index b0233dc1f03..15d3dc83ef4 100644 --- a/src/DynamoCore/Library/FunctionDescriptor.cs +++ b/src/DynamoCore/Library/FunctionDescriptor.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Reflection; using System.Text; +using Dynamo.Configuration; using Dynamo.Graph.Nodes; using Dynamo.Interfaces; using Dynamo.Library; @@ -145,7 +146,12 @@ public FunctionDescriptorParams() /// /// Indicates if the lacing strategy is disabled on the function /// - public bool IsLacingDisabled { get; set; } + public bool IsLacingDisabled { get; set; } + //TODO - should this somehow contain more info - ExperimentalInfo{IsExperimental, ExperimentalMessage/url}?} + /// + /// Experimental/Unstable function + /// + internal bool IsExperimental { get; set; } } /// @@ -186,7 +192,7 @@ public FunctionDescriptor(FunctionDescriptorParams funcDescParams) var type = funcDescParams.FunctionType; var inputParameters = new List>(); //Add instance parameter as one of the inputs for instance method as well as properties. - if(type == FunctionType.InstanceMethod || type == FunctionType.InstanceProperty) + if (type == FunctionType.InstanceMethod || type == FunctionType.InstanceProperty) inputParameters.Add(Tuple.Create(UnqualifedClassName.ToLower(), UnqualifedClassName)); if (Parameters.Any()) @@ -196,7 +202,7 @@ public FunctionDescriptor(FunctionDescriptorParams funcDescParams) } InputParameters = inputParameters; - ReturnType = funcDescParams.ReturnType; + ReturnType = funcDescParams.ReturnType; Type = type; ReturnKeys = funcDescParams.ReturnKeys; IsVarArg = funcDescParams.IsVarArg; @@ -206,6 +212,7 @@ public FunctionDescriptor(FunctionDescriptorParams funcDescParams) IsBuiltIn = funcDescParams.IsBuiltIn; IsPackageMember = funcDescParams.IsPackageMember; IsLacingDisabled = funcDescParams.IsLacingDisabled; + IsExperimental = funcDescParams.IsExperimental || CheckIfFunctionIsMarkedExperimentalByPrefs(this); } /// @@ -320,28 +327,28 @@ public string Category { var categoryBuf = new StringBuilder(); categoryBuf.Append(GetRootCategory()); - + //if this is not BuiltIn function search NodeCategoryAttribute for it - if (ClassName!=null) + if (ClassName != null) { //get function assembly var asm = AppDomain.CurrentDomain.GetAssemblies() .Where(x => x.GetName().Name == Path.GetFileNameWithoutExtension(Assembly)) .ToArray(); - if (asm.Any() && asm.First().GetType(ClassName)!=null) + if (asm.Any() && asm.First().GetType(ClassName) != null) { //get class type of function var type = asm.First().GetType(ClassName); //get NodeCategoryAttribute for this function if it was been defined - var nodeCat = type.GetMethods().Where(x=>x.Name==FunctionName) - .Select(x => x.GetCustomAttribute(typeof (NodeCategoryAttribute))) - .Where(x=>x!=null) + var nodeCat = type.GetMethods().Where(x => x.Name == FunctionName) + .Select(x => x.GetCustomAttribute(typeof(NodeCategoryAttribute))) + .Where(x => x != null) .Cast() - .Select(x=>x.ElementCategory) + .Select(x => x.ElementCategory) .FirstOrDefault(); - + //if attribute is found compose node category string with last part from attribute if (!string.IsNullOrEmpty(nodeCat) && ( nodeCat == LibraryServices.Categories.Constructors @@ -353,7 +360,7 @@ public string Category } } } - + switch (Type) { case FunctionType.Constructor: @@ -567,5 +574,16 @@ private string GetRootCategory() return string.IsNullOrEmpty(Namespace) ? filename : filename + "." + Namespace; } + private bool CheckIfFunctionIsMarkedExperimentalByPrefs(FunctionDescriptor fd) + { + if (PreferenceSettings.InitialExperimentalLib_Namespaces. + Where(x => x.StartsWith(fd.Assembly + ":")).Select(x => x.Split(":").LastOrDefault()).Any(nsp => fd.QualifiedName.StartsWith(nsp))) + { + return true; + } + return false; + } + internal bool IsExperimental { get;} } + } diff --git a/src/DynamoCore/Library/LibraryServices.cs b/src/DynamoCore/Library/LibraryServices.cs index 6b78418f09e..f48cf117c20 100644 --- a/src/DynamoCore/Library/LibraryServices.cs +++ b/src/DynamoCore/Library/LibraryServices.cs @@ -1083,9 +1083,9 @@ private void ImportProcedure(string library, ProcedureNode proc) IsBuiltIn = pathManager.PreloadedLibraries.Contains(library) || library.StartsWith(PathManager.BuiltinPackagesDirectory), IsPackageMember = packagedLibraries.Contains(library), - IsLacingDisabled = isLacingDisabled + IsLacingDisabled = isLacingDisabled, + IsExperimental = (methodAttribute?.IsExperimental).GetValueOrDefault()|| (classAttribute?.IsExperimental).GetValueOrDefault() }); - AddImportedFunctions(library, new[] { function }); } diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs index c1b267cd378..349ceb8a112 100644 --- a/src/DynamoCore/Models/DynamoModel.cs +++ b/src/DynamoCore/Models/DynamoModel.cs @@ -3399,6 +3399,11 @@ private NodeModelSearchElement AddNodeTypeToSearch(TypeLoadData typeLoadData) { return null; } + if(PreferenceSettings.InitialExperimentalLib_Namespaces. + Select(x => x.Split(":").LastOrDefault()).Any(x => x.Contains(typeLoadData.Category))){ + //TODO safer way to set this? + typeLoadData.IsExperimental = true; + } var node = new NodeModelSearchElement(typeLoadData); SearchModel?.Add(node); diff --git a/src/DynamoCore/Properties/Resources.Designer.cs b/src/DynamoCore/Properties/Resources.Designer.cs index 61cfe00c6b3..7935c0f1ab3 100644 --- a/src/DynamoCore/Properties/Resources.Designer.cs +++ b/src/DynamoCore/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Dynamo.Properties -{ - - +namespace Dynamo.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -497,6 +497,15 @@ public static string DllLoadException { } } + /// + /// Looks up a localized string similar to This node is currently experimental. Its behavior, name, and signature are subject to change.. + /// + public static string DocsExperimentalPrefixMessage { + get { + return ResourceManager.GetString("DocsExperimentalPrefixMessage", resourceCulture); + } + } + /// /// Looks up a localized string similar to Download latest version. /// diff --git a/src/DynamoCore/Properties/Resources.en-US.resx b/src/DynamoCore/Properties/Resources.en-US.resx index 6af0906a03e..95a14871ccd 100644 --- a/src/DynamoCore/Properties/Resources.en-US.resx +++ b/src/DynamoCore/Properties/Resources.en-US.resx @@ -920,4 +920,7 @@ This package likely contains an assembly that is blocked. You will need to load default input name, rename me! - + + This node is currently experimental. Its behavior, name, and signature are subject to change. + + \ No newline at end of file diff --git a/src/DynamoCore/Properties/Resources.resx b/src/DynamoCore/Properties/Resources.resx index 0b04d7adc50..bef1c049ee2 100644 --- a/src/DynamoCore/Properties/Resources.resx +++ b/src/DynamoCore/Properties/Resources.resx @@ -923,4 +923,7 @@ This package likely contains an assembly that is blocked. You will need to load default input name, rename me! - + + This node is currently experimental. Its behavior, name, and signature are subject to change. + + \ No newline at end of file diff --git a/src/DynamoCore/PublicAPI.Unshipped.txt b/src/DynamoCore/PublicAPI.Unshipped.txt index bb911e51714..a0b5b30c8af 100644 --- a/src/DynamoCore/PublicAPI.Unshipped.txt +++ b/src/DynamoCore/PublicAPI.Unshipped.txt @@ -2782,6 +2782,7 @@ static Dynamo.Properties.Resources.DescriptionResource1.get -> string static Dynamo.Properties.Resources.DirectoryNotFound.get -> string static Dynamo.Properties.Resources.DisplayEngineFailureMessageDescription.get -> string static Dynamo.Properties.Resources.DllLoadException.get -> string +static Dynamo.Properties.Resources.DocsExperimentalPrefixMessage.get -> string static Dynamo.Properties.Resources.DownloadLatestButton.get -> string static Dynamo.Properties.Resources.DSFunctionNodeDescription.get -> string static Dynamo.Properties.Resources.DulicatedPackage.get -> string diff --git a/src/DynamoCore/Search/SearchElements/NodeModelSearchElementBase.cs b/src/DynamoCore/Search/SearchElements/NodeModelSearchElementBase.cs index 8ac8fa2943c..8bd914983f8 100644 --- a/src/DynamoCore/Search/SearchElements/NodeModelSearchElementBase.cs +++ b/src/DynamoCore/Search/SearchElements/NodeModelSearchElementBase.cs @@ -39,6 +39,7 @@ protected NodeModelSearchElementBase(TypeLoadData typeLoadData) { ElementType |= ElementTypes.BuiltIn; } + IsExperimental = typeLoadData.IsExperimental; } } } diff --git a/src/DynamoCore/Search/SearchElements/NodeSearchElement.cs b/src/DynamoCore/Search/SearchElements/NodeSearchElement.cs index 0d1751345d4..d286e2ff02f 100644 --- a/src/DynamoCore/Search/SearchElements/NodeSearchElement.cs +++ b/src/DynamoCore/Search/SearchElements/NodeSearchElement.cs @@ -3,6 +3,7 @@ using System.Linq; using Dynamo.Configuration; using Dynamo.Graph.Nodes; +using Dynamo.Properties; namespace Dynamo.Search.SearchElements { @@ -19,6 +20,7 @@ public abstract class NodeSearchElement : ISearchEntry, ISource, IClo private SearchElementGroup group; private string assembly; private bool isVisibleInSearch = true; + internal virtual bool IsExperimental { get; set; } internal AutoCompletionNodeElementInfo AutoCompletionNodeElementInfo { get; set; } = new AutoCompletionNodeElementInfo(); @@ -141,7 +143,15 @@ public string Description get { if (string.IsNullOrEmpty(description)) + { return Configurations.NoDescriptionAvailable; + } + if (IsExperimental) + { + return $"{Resources.DocsExperimentalPrefixMessage}" + + $"{Environment.NewLine}{Environment.NewLine}{description}"; + } + return description; } diff --git a/src/DynamoCore/Search/SearchElements/ZeroTouchSearchElement.cs b/src/DynamoCore/Search/SearchElements/ZeroTouchSearchElement.cs index 9831ed8e4ac..59572a7419d 100644 --- a/src/DynamoCore/Search/SearchElements/ZeroTouchSearchElement.cs +++ b/src/DynamoCore/Search/SearchElements/ZeroTouchSearchElement.cs @@ -32,6 +32,8 @@ public class ZeroTouchSearchElement : NodeSearchElement /// internal FunctionDescriptor Descriptor => functionDescriptor; + internal override bool IsExperimental => functionDescriptor.IsExperimental; + /// /// Initializes a new instance of the class /// with the DesignScript function description diff --git a/src/DynamoCoreWpf/DynamoCoreWpf.csproj b/src/DynamoCoreWpf/DynamoCoreWpf.csproj index 43dff85319e..0aa4c863c81 100644 --- a/src/DynamoCoreWpf/DynamoCoreWpf.csproj +++ b/src/DynamoCoreWpf/DynamoCoreWpf.csproj @@ -23,7 +23,7 @@ - 1.0.21 + 1.0.26 SplashScreen diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs index 6eab0be7f13..90d4ff95e13 100644 --- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs +++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Dynamo.Wpf.Properties { - using System; - - +namespace Dynamo.Wpf.Properties +{ + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -5754,6 +5754,15 @@ public static string PackageDetailsIncompatibileVersionTooltip { } } + /// + /// Looks up a localized string similar to Incompatible with your current setup. + /// + public static string PackageDetailsIncompatibilityWithSetup { + get { + return ResourceManager.GetString("PackageDetailsIncompatibilityWithSetup", resourceCulture); + } + } + /// /// Looks up a localized string similar to KEYWORDS. /// @@ -5844,6 +5853,15 @@ public static string PackageDetailsVersionsAndPackageRequirements { } } + /// + /// Looks up a localized string similar to Unknown compatibility with your current setup. + /// + public static string PackageDetailsXCompatibilityWithSetup { + get { + return ResourceManager.GetString("PackageDetailsXCompatibilityWithSetup", resourceCulture); + } + } + /// /// Looks up a localized string similar to Package Download Confirmation. /// diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx index bc3e5c110ce..4f1417b016b 100644 --- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx +++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx @@ -4056,6 +4056,12 @@ To make this file into a new template, save it to a different folder, then move Compatible with your current setup + + + Incompatible with your current setup + + + Unknown compatibility with your current setup Size diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx index 6fd4ac719f6..e285f4717e2 100644 --- a/src/DynamoCoreWpf/Properties/Resources.resx +++ b/src/DynamoCoreWpf/Properties/Resources.resx @@ -4043,6 +4043,12 @@ To make this file into a new template, save it to a different folder, then move Compatible with your current setup + + + Incompatible with your current setup + + + Unknown compatibility with your current setup Size diff --git a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt index 357e3063136..9b55e04bb31 100644 --- a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt +++ b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt @@ -2416,6 +2416,7 @@ Dynamo.ViewModels.NodeViewModel.InPorts.set -> void Dynamo.ViewModels.NodeViewModel.IsCustomFunction.get -> bool Dynamo.ViewModels.NodeViewModel.IsDisplayingLabels.get -> bool Dynamo.ViewModels.NodeViewModel.IsDisplayingLabels.set -> void +Dynamo.ViewModels.NodeViewModel.IsExperimental.get -> bool Dynamo.ViewModels.NodeViewModel.IsFrozen.get -> bool Dynamo.ViewModels.NodeViewModel.IsFrozen.set -> void Dynamo.ViewModels.NodeViewModel.IsFrozenExplicitly.get -> bool @@ -5017,6 +5018,7 @@ static Dynamo.Wpf.Properties.Resources.PackageDetailsDescription.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsGroup.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsHost.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsIncompatibileVersionTooltip.get -> string +static Dynamo.Wpf.Properties.Resources.PackageDetailsIncompatibilityWithSetup.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsKeywords.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsLicense.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsLinks.get -> string @@ -5027,6 +5029,7 @@ static Dynamo.Wpf.Properties.Resources.PackageDetailsSize.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsUnknownCompatibilityVersionTooltip.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsVersions.get -> string static Dynamo.Wpf.Properties.Resources.PackageDetailsVersionsAndPackageRequirements.get -> string +static Dynamo.Wpf.Properties.Resources.PackageDetailsXCompatibilityWithSetup.get -> string static Dynamo.Wpf.Properties.Resources.PackageDownloadConfirmMessageBoxTitle.get -> string static Dynamo.Wpf.Properties.Resources.PackageDownloadErrorMessageBoxTitle.get -> string static Dynamo.Wpf.Properties.Resources.PackageDownloadMessageBoxTitle.get -> string diff --git a/src/DynamoCoreWpf/UI/Prompts/EditWindow.xaml.cs b/src/DynamoCoreWpf/UI/Prompts/EditWindow.xaml.cs index 9ca551059ab..b7fa9ab96ab 100644 --- a/src/DynamoCoreWpf/UI/Prompts/EditWindow.xaml.cs +++ b/src/DynamoCoreWpf/UI/Prompts/EditWindow.xaml.cs @@ -35,14 +35,6 @@ public EditWindow(DynamoViewModel dynamoViewModel, Owner = dynamoViewModel.Owner; this.WindowStartupLocation = WindowStartupLocation.CenterOwner; - this.Loaded += (sender, e) => this.editText.Focus(); - - // Center the window again once rendering is complete - this.ContentRendered += (sender, e) => - { - this.Left = Owner.Left + (Owner.Width - this.ActualWidth) / 2; - this.Top = Owner.Top + (Owner.Height - this.ActualHeight) / 2; - }; // do not accept value if user closes this.Closing += (sender, args) => this.DialogResult = false; @@ -57,8 +49,28 @@ public EditWindow(DynamoViewModel dynamoViewModel, } this.editText.PreviewKeyDown += EditText_PreviewKeyDown; this.Closed += EditWindow_Closed; + this.ContentRendered += OnContentRendered; } + // Centralize the window correctly after it is rendered + private void OnContentRendered(object sender, EventArgs e) + { + // Unsubscribe immediately, we only call this once on initialization + this.ContentRendered -= OnContentRendered; + + CenterWindowRelativeToOwner(); + editText.Focus(); + } + + // Centralize the window relative to another Window + private void CenterWindowRelativeToOwner() + { + if (Owner != null) + { + this.Left = Owner.Left + (Owner.Width - this.ActualWidth) / 2; + this.Top = Owner.Top + (Owner.Height - this.ActualHeight) / 2; + } + } private void CloseButton_OnClick(object sender, RoutedEventArgs e) { @@ -105,9 +117,6 @@ private void ToggleButtons(bool toggle) private void EditText_PreviewKeyDown(object sender, KeyEventArgs e) { - var textBox = sender as TextBox; - var caretIndex = textBox.CaretIndex; - EditTextBoxPreviewKeyDown?.Invoke(sender, e); } diff --git a/src/DynamoCoreWpf/UI/Prompts/PortPropertiesEditPrompt.xaml b/src/DynamoCoreWpf/UI/Prompts/PortPropertiesEditPrompt.xaml index 4008e0d78b6..8db11fca7d9 100644 --- a/src/DynamoCoreWpf/UI/Prompts/PortPropertiesEditPrompt.xaml +++ b/src/DynamoCoreWpf/UI/Prompts/PortPropertiesEditPrompt.xaml @@ -2,14 +2,15 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:UI.Prompts" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:p="clr-namespace:Dynamo.Wpf.Properties;assembly=DynamoCoreWpf" xmlns:ui="clr-namespace:Dynamo.UI" - mc:Ignorable="d" Width="450" + Height="368" WindowStartupLocation="CenterOwner" - WindowStyle="None"> + WindowStyle="None" + mc:Ignorable="d"> @@ -31,26 +32,26 @@ + Padding="8,10" + Background="#353535" + BorderThickness="0" + CaretBrush="{StaticResource Blue300Brush}" + Focusable="True" + FontFamily="{StaticResource ArtifaktElementRegular}" + FontSize="12px" + Foreground="{StaticResource PrimaryCharcoal200Brush}" + MaxLength="{TemplateBinding MaxLength}" + Tag="{TemplateBinding Tag}" + Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text, UpdateSourceTrigger=PropertyChanged}" + TextWrapping="Wrap" /> + Padding="10" + FontFamily="{StaticResource ArtifaktElementRegular}" + FontSize="12px" + Foreground="{StaticResource PrimaryCharcoal200Brush}" + IsHitTestVisible="False" + Opacity="0.5" + Text="{TemplateBinding Tag}"> - + + assembly.GetName().Name.Equals(assemblyName, StringComparison.OrdinalIgnoreCase)); + + Assert.False(ffiTargetAsm); + } + [Test] public void TypedIdentifier_AssignedToDifferentType_ThrowsWarning2() { @@ -2458,10 +2475,13 @@ public void TestMethodKeywordCompletionWhenTyping() string code = "im"; var completions = codeCompletionServices.SearchCompletions(code, Guid.Empty); - // Expected 3 completion items - Assert.AreEqual(3, completions.Count()); + Assert.AreEqual(5, completions.Count()); - string[] expected = { "Imperative", "Minimal", "MinimalTracedClass" }; + string[] expected = { "ClassWithExperimentalMethod", + "ExperimentalClass", + "Imperative", + "Minimal", + "MinimalTracedClass" }; var actual = completions.Select(x => x.Text).OrderBy(x => x); Assert.AreEqual(expected, actual); diff --git a/test/DynamoCoreTests/DSEvaluationUnitTestBase.cs b/test/DynamoCoreTests/DSEvaluationUnitTestBase.cs index 02e38cde2ce..2f8e3480d59 100644 --- a/test/DynamoCoreTests/DSEvaluationUnitTestBase.cs +++ b/test/DynamoCoreTests/DSEvaluationUnitTestBase.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; @@ -156,6 +156,11 @@ protected void AssertError(string guid) var node = GetModel().CurrentWorkspace.Nodes.First(n => n.GUID.ToString() == guid); Assert.True(node.IsInErrorState); } + protected void AssertWarning(string guid) + { + var node = GetModel().CurrentWorkspace.Nodes.First(n => n.GUID.ToString() == guid); + Assert.True(node.State is ElementState.Warning || node.State is ElementState.PersistentWarning); + } protected void AssertPreviewValue(string guid, object value) { diff --git a/test/DynamoCoreTests/DynamoCoreTests.csproj b/test/DynamoCoreTests/DynamoCoreTests.csproj index f961461eb6d..1e6124bce11 100644 --- a/test/DynamoCoreTests/DynamoCoreTests.csproj +++ b/test/DynamoCoreTests/DynamoCoreTests.csproj @@ -28,7 +28,7 @@ - + all compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/DynamoCoreTests/ExperimentalNodesTests.cs b/test/DynamoCoreTests/ExperimentalNodesTests.cs new file mode 100644 index 00000000000..0bc68ca3051 --- /dev/null +++ b/test/DynamoCoreTests/ExperimentalNodesTests.cs @@ -0,0 +1,37 @@ +using Dynamo.Engine; +using NUnit.Framework; + + +namespace Dynamo.Tests +{ + [TestFixture] + internal class ExperimentalNodesTests + { + [Test] + public void FunctionDescriptorIsMarkedExperimentalByExperimentalPrefsSection() + { + var x = new FunctionDescriptor(new FunctionDescriptorParams + { + Assembly = "ProtoGeometry.dll", + ClassName = "Autodesk.DesignScript.Geometry.PanelSurface", + FunctionName = "somefunc", + Parameters = [], + ReturnType = ProtoCore.TypeSystem.BuildPrimitiveTypeObject(ProtoCore.PrimitiveType.Void), + FunctionType = FunctionType.InstanceMethod, + IsVisibleInLibrary = true, + ReturnKeys = [], + PathManager = null, + IsVarArg = false, + ObsoleteMsg = null, + CanUpdatePeriodically = false, + IsBuiltIn = false, + IsPackageMember = false, + IsLacingDisabled = false, + //even though this is set to false, the function should be marked as experimental + //because the assembly/classname combination is marked as experimental in the experimental prefs section + IsExperimental = false, + }); + Assert.That(x.IsExperimental, Is.True); + } + } +} diff --git a/test/DynamoCoreTests/LibraryTests.cs b/test/DynamoCoreTests/LibraryTests.cs index 24aefe334bd..1bf322b11d2 100644 --- a/test/DynamoCoreTests/LibraryTests.cs +++ b/test/DynamoCoreTests/LibraryTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using System.Xml; @@ -111,6 +111,24 @@ public void TestLoadNoNamespaceClass() } } + [Test] + public void FunctionDescriptorIsMarkedExperimentalByAttr() + { + string libraryPath = "FFITarget.dll"; + if (!libraryServices.IsLibraryLoaded(libraryPath)) + { + libraryServices.ImportLibrary(libraryPath); + Assert.IsTrue(LibraryLoaded); + } + //get our function descriptor that is marked experimental + var functions = libraryServices.GetFunctionGroups(libraryPath).SelectMany(x => x.Functions.Where(x => x.IsExperimental)); + Assert.AreEqual(2,functions.Count()); + + //marked experimental because method is experimental + Assert.AreEqual("ExperimentalMethod", functions.ElementAt(0).FunctionName); + //implicitly marked experimental because owning class is experimental + Assert.AreEqual("Method", functions.ElementAt(1).FunctionName); + } [Test] [Category("UnitTests")] diff --git a/test/DynamoCoreTests/Nodes/StringTests.cs b/test/DynamoCoreTests/Nodes/StringTests.cs index e4db34851b4..7d164f2316a 100644 --- a/test/DynamoCoreTests/Nodes/StringTests.cs +++ b/test/DynamoCoreTests/Nodes/StringTests.cs @@ -2,8 +2,10 @@ using System.IO; using System.Linq; using CoreNodeModels; +using Dynamo.Configuration; using Dynamo.Graph.Nodes; using Dynamo.Graph.Nodes.ZeroTouch; +using Dynamo.Models; using NUnit.Framework; namespace Dynamo.Tests @@ -439,6 +441,37 @@ public void TestStringToNumberNormalInput() AssertPreviewValue("898ee89d-a934-4b43-a051-da3459be329a", 1000); AssertPreviewValue("0afc0a8f-3d8a-4d7c-a2ec-d868cbb29b5f", 123456789); } + [Test] + public void TestStringToNumberWithFormat() + { + string testFilePath = Path.Combine(localDynamoStringTestFolder, "TestNumberToString_normal_numericFormat.dyn"); + CurrentDynamoModel.PreferenceSettings.NumberFormat = "f1"; + RunModel(testFilePath); + var watch0 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch0").FirstOrDefault().GUID.ToString(); + var watch1 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch1").FirstOrDefault().GUID.ToString(); + var watch2 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch2").FirstOrDefault().GUID.ToString(); + var watch3parent = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch3") + .FirstOrDefault().ImediateUpstreamNodes().FirstOrDefault().GUID.ToString(); + var watch3 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch3").FirstOrDefault().GUID.ToString(); + var watch4 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch4").FirstOrDefault().GUID.ToString(); + var watch4parent = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch4") + .FirstOrDefault().ImediateUpstreamNodes().FirstOrDefault().GUID.ToString(); + var watch5 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch5").FirstOrDefault().GUID.ToString(); + var watch6 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch6").FirstOrDefault().GUID.ToString(); + var watch7 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch7").FirstOrDefault().GUID.ToString(); + + AssertPreviewValue(watch0, "123456789"); + AssertPreviewValue(watch1, new string[]{ "123456789.000", "123456789.0", "123456789", "111010110111100110100010101" }); + AssertPreviewValue(watch2, new string[] { "-123456789.000", "-123456789.0", "-123456789", "1111111111111111111111111111111111111000101001000011001011101011" }); + AssertPreviewValue(watch3, new string[] { "3.460", "3.5", "3.46", "Format specifier was invalid." }); + AssertPreviewValue(watch4, new string[] { "-3.460", "-3.5", "-3.46", "Format specifier was invalid." }); + AssertPreviewValue(watch5, new string[] { "5.000", "5.0", "5", "101" }); + AssertPreviewValue(watch6, new string[] { "{key:0.000000000}", "{key:0.000000000}", "{key:0.000000000}", "{key:0.000000000}" }); + AssertPreviewValue(watch7, new string[] { "{key:5}", "{key:5}", "{key:5}", "{key:5}" }); + + AssertWarning(watch3parent); + AssertWarning(watch4parent); + } #endregion @@ -866,6 +899,45 @@ public void TestStringFromArray() RunModel(testFilePath); AssertPreviewValue("c27d9e05-45f7-4aac-8f53-a9e485e0f9c0", "[1,2,3]"); + } + [Test] + public void TestStringFromArrayWithFormat() + { + string testFilePath = Path.Combine(localDynamoStringTestFolder, "TestStringFromArrayPreview_numericformat.dyn"); + + RunModel(testFilePath); + var watch1 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch1").FirstOrDefault().GUID.ToString(); + var watch2 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch2").FirstOrDefault().GUID.ToString(); + var watch3 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch3").FirstOrDefault().GUID.ToString(); + var watch4 = CurrentDynamoModel.CurrentWorkspace.Nodes.Where(x => x.Name.ToLower() == "watch4").FirstOrDefault().GUID.ToString(); + + AssertPreviewValue(watch1, "[1.000000,1.666667,2.333333,3.000000]"); + AssertPreviewValue(watch2, "[1,1.6666666666666667,2.3333333333333335,3]"); + AssertPreviewValue(watch3, new string[] { "[1.0,1.7,2.3,3.0]", "[1,1.6666666666666667,2.3333333333333335,3]", "Format specifier was invalid." }); + AssertPreviewValue(watch4, "Function"); + + } + + [Test] + public void StringFormatNodesAreCurrentlyExperimental() + { +#pragma warning disable NEWNODE_FormattedStringFromObject +#pragma warning disable NEWNODE_FormattedStringFromArray + +#pragma warning disable NM_ISEXPERIMENTAL_GLPYH + + var formatString = new FormattedStringFromObject(); + var formatStringArr = new FormattedStringFromArray(); + Assert.AreEqual(true,formatString.IsExperimental); + Assert.AreEqual(true, formatStringArr.IsExperimental); + Assert.IsTrue(formatString.InPorts[1].DefaultValue.Kind == ProtoCore.AST.AssociativeAST.AstKind.String && formatString.InPorts[1].UsingDefaultValue == true); + Assert.IsTrue(formatStringArr.InPorts[1].DefaultValue.Kind == ProtoCore.AST.AssociativeAST.AstKind.String && formatStringArr.InPorts[1].UsingDefaultValue == true); + +#pragma warning restore NM_ISEXPERIMENTAL_GLPYH +#pragma warning restore NEWNODE_FormattedStringFromObject +#pragma warning restore NEWNODE_FormattedStringFromArray + + } #endregion } diff --git a/test/DynamoCoreTests/SerializationTests.cs b/test/DynamoCoreTests/SerializationTests.cs index 21faa8ee02c..4057c9f573b 100644 --- a/test/DynamoCoreTests/SerializationTests.cs +++ b/test/DynamoCoreTests/SerializationTests.cs @@ -607,6 +607,9 @@ public class SerializationTests : DynamoModelTestBase public static string jsonFolderNameDifferentCulture = "json_differentCulture"; private const int MAXNUM_SERIALIZATIONTESTS_TOEXECUTE = 300; + // Filter out dyns that change during testing + private static HashSet filterOutFromSerializationTests = ["updateInputNodeModel.dyn"]; + private TimeSpan lastExecutionDuration = new TimeSpan(); private Dictionary modelsGuidToIdMap = new Dictionary(); @@ -939,7 +942,7 @@ public static object[] FindWorkspaces() { var di = new DirectoryInfo(TestDirectory); var fis = di.GetFiles("*.dyn", SearchOption.AllDirectories); - return fis.Select(fi => fi.FullName).Take(MAXNUM_SERIALIZATIONTESTS_TOEXECUTE).ToArray(); + return fis.Where(fi => !filterOutFromSerializationTests.Contains(fi.Name)).Select(fi => fi.FullName).Take(MAXNUM_SERIALIZATIONTESTS_TOEXECUTE).ToArray(); } /// diff --git a/test/DynamoCoreTests/StringUtilitiesTest.cs b/test/DynamoCoreTests/StringUtilitiesTest.cs new file mode 100644 index 00000000000..944da8fdb3d --- /dev/null +++ b/test/DynamoCoreTests/StringUtilitiesTest.cs @@ -0,0 +1,49 @@ +using DynamoUtilities; +using NUnit.Framework; + +namespace Dynamo.Tests +{ + [TestFixture] + class StringUtilitiesTest + { + [TestCase("512 MiB", ExpectedResult = "512 MB")] + [TestCase("1 GiB", ExpectedResult = "1 GB")] + [TestCase("128 KiB", ExpectedResult = "128 KB")] + [TestCase("2 TiB", ExpectedResult = "2 TB")] + [TestCase("0 PiB", ExpectedResult = "0 PB")] + [TestCase("1024 EiB", ExpectedResult = "1024 EB")] + public string ConvertToSIFileSize_StandardUnitsWithI_RemovesI(string input) + { + return StringUtilities.SimplifyFileSizeUnit (input); + } + + [TestCase("512 MB", ExpectedResult = "512 MB")] + [TestCase("1 GB", ExpectedResult = "1 GB")] + [TestCase("128 KB", ExpectedResult = "128 KB")] + public string ConvertToSIFileSize_StandardUnitsWithoutI_Unchanged(string input) + { + return StringUtilities.SimplifyFileSizeUnit (input); + } + + [TestCase("Random Text", ExpectedResult = "Random Text")] + [TestCase("128", ExpectedResult = "128")] + [TestCase("", ExpectedResult = "")] + [TestCase(null, ExpectedResult = null)] + public string ConvertToSIFileSize_NonStandardInputs_Unchanged(string input) + { + return StringUtilities.SimplifyFileSizeUnit (input); + } + + [Test] + public void ConvertToSIFileSize_NullInput_ReturnsNull() + { + Assert.IsNull(StringUtilities.SimplifyFileSizeUnit (null)); + } + + [Test] + public void ConvertToSIFileSize_EmptyString_ReturnsEmptyString() + { + Assert.AreEqual("", StringUtilities.SimplifyFileSizeUnit ("")); + } + } +} diff --git a/test/DynamoCoreTests/UnitsOfMeasureTests.cs b/test/DynamoCoreTests/UnitsOfMeasureTests.cs index ae20ee162fb..1be19d38e69 100644 --- a/test/DynamoCoreTests/UnitsOfMeasureTests.cs +++ b/test/DynamoCoreTests/UnitsOfMeasureTests.cs @@ -962,7 +962,7 @@ public void CanCreateForgeQuantity_FromFutureTypeId() public void ForgeQuantityContainsMultipleUnits() { var quantityType = Quantity.ByTypeID("autodesk.unit.quantity:length-1.0.5"); - Assert.GreaterOrEqual(16,quantityType.Units.Count()); + Assert.GreaterOrEqual(17,quantityType.Units.Count()); } [Test, Category("UnitTests")] public void ForgeQuantityEquality() diff --git a/test/DynamoCoreWpfTests/DynamoViewTests.cs b/test/DynamoCoreWpfTests/DynamoViewTests.cs index 1e489261dd3..58fa42056d6 100644 --- a/test/DynamoCoreWpfTests/DynamoViewTests.cs +++ b/test/DynamoCoreWpfTests/DynamoViewTests.cs @@ -6,25 +6,17 @@ using System.IO; using System.Linq; using System.Threading; -using System.Windows; using System.Windows.Controls; -using System.Windows.Input; -using System.Windows.Media; using Dynamo.Configuration; -using Dynamo.Controls; using Dynamo.Graph.Nodes; using Dynamo.Graph.Workspaces; using Dynamo.Models; -using Dynamo.Selection; using Dynamo.Utilities; using Dynamo.ViewModels; using Dynamo.Wpf.Controls; using Dynamo.Wpf.ViewModels.Core; using Dynamo.Wpf.Views; -using DynamoCoreWpfTests.Utility; -using Newtonsoft.Json.Linq; using NUnit.Framework; -using SharpDX.DXGI; namespace DynamoCoreWpfTests @@ -147,11 +139,13 @@ public void ElementBinding_SaveAs() var prebindingPath = Path.Combine(GetTestDirectory(ExecutingDirectory), prebindingPathInTestDir); var pathInTestsDir = @"core\callsite\trace_test.dyn"; - var filePath = Path.Combine(GetTestDirectory(ExecutingDirectory), pathInTestsDir); + var filePath = Path.Combine(TempFolder, pathInTestsDir); + Directory.CreateDirectory(Path.GetDirectoryName(filePath)); // Always start with a fresh workspace with no binding data for this test. - File.Copy(prebindingPath, filePath,true); - OpenAndRun(pathInTestsDir); + File.Copy(prebindingPath, filePath, true); + ViewModel.OpenCommand.Execute(filePath); + Run(); // Assert that the node doesn't have trace data the first time it's run. var hasTraceData = Model.CurrentWorkspace.Nodes.FirstOrDefault(x => @@ -166,13 +160,14 @@ public void ElementBinding_SaveAs() Assert.AreEqual(1, (obj["Bindings"] as IEnumerable).Count()); var saveAsPathInTestDir = @"core\callsite\trace_test2.dyn"; - var saveAsPath = Path.Combine(GetTestDirectory(ExecutingDirectory), saveAsPathInTestDir); + var saveAsPath = Path.Combine(TempFolder, saveAsPathInTestDir); + Directory.CreateDirectory(Path.GetDirectoryName(saveAsPath)); // SaveAs current workspace, close workspace. ViewModel.SaveAsCommand.Execute(saveAsPath); ViewModel.CloseHomeWorkspaceCommand.Execute(null); - Open(saveAsPathInTestDir); + ViewModel.OpenCommand.Execute(saveAsPath); // Assert saved as file doesn't have binding data after open. DynamoUtilities.PathHelper.isValidJson(saveAsPath, out fileContents, out ex); diff --git a/test/DynamoCoreWpfTests/NodeViewCustomizationTests.cs b/test/DynamoCoreWpfTests/NodeViewCustomizationTests.cs index 2aaae5a5534..1fd807650d2 100644 --- a/test/DynamoCoreWpfTests/NodeViewCustomizationTests.cs +++ b/test/DynamoCoreWpfTests/NodeViewCustomizationTests.cs @@ -312,9 +312,9 @@ public void WatchImageCoreContainsImage() // Starting from Dynamo 2.13, node view now comes with // images like node icon, lacing image etc - // As of March 2022, we have 7 images per NodeView + // As of Nov 2024, we have 8 images per NodeView // Images are named for ease of use - Assert.AreEqual(7, imgs.Count()); + Assert.AreEqual(8, imgs.Count()); var img = imgs.First(x => x.Name == "DotsImage"); diff --git a/test/DynamoCoreWpfTests/UnitsUITests.cs b/test/DynamoCoreWpfTests/UnitsUITests.cs index ace1ae8ade6..dcabf5fceec 100644 --- a/test/DynamoCoreWpfTests/UnitsUITests.cs +++ b/test/DynamoCoreWpfTests/UnitsUITests.cs @@ -199,7 +199,7 @@ public void ForgeUnitDropdownsLoadWithMalformedData() //we've changed both index and name, so a new item is selected. Assert.AreNotEqual(DynamoUnits.Quantity.ByTypeID("autodesk.unit.quantity:force-1.0.2"), node3.CachedValue.Data); Assert.AreEqual(DynamoUnits.Symbol.ByTypeID("autodesk.unit.symbol:mm-1.0.1"), node4.CachedValue.Data); - Assert.AreEqual(DynamoUnits.Unit.ByTypeID("autodesk.unit.unit:millimeters-1.0.1"), node5.CachedValue.Data); + Assert.AreEqual(DynamoUnits.Unit.ByTypeID("autodesk.unit.unit:microarcseconds-1.0.1"), node5.CachedValue.Data); Assert.AreEqual(DynamoUnits.Unit.ByTypeID("autodesk.unit.unit:meters-1.0.1"), node6.CachedValue.Data); Assert.AreEqual(DynamoUnits.Unit.ByTypeID("autodesk.unit.unit:millimeters-1.0.1"), node7.CachedValue.Data); Assert.AreEqual(3, node8.CachedValue.GetElements().Count()); diff --git a/test/DynamoCoreWpfTests/ViewExtensions/DocumentationBrowserViewExtensionTests.cs b/test/DynamoCoreWpfTests/ViewExtensions/DocumentationBrowserViewExtensionTests.cs index 57bd2ea7efd..4353a0d4f04 100644 --- a/test/DynamoCoreWpfTests/ViewExtensions/DocumentationBrowserViewExtensionTests.cs +++ b/test/DynamoCoreWpfTests/ViewExtensions/DocumentationBrowserViewExtensionTests.cs @@ -759,7 +759,7 @@ public void AddGraphInSpecificLocationToWorkspace() //we somehow need use single threaded sync context to force webview2 async initalization on this thread. //unfortunately it passes locally but then still fails on master-15. var testDirectory = GetTestDirectory(ExecutingDirectory); - var tempDynDirectory = Path.Combine(testDirectory, "Temp Test Path"); + var tempDynDirectory = Path.Combine(TempFolder, "Temp Test Path"); var dynFileName = Path.Combine(testDirectory, @"UI\BasicAddition.dyn"); var insertDynFilePath = Path.Combine(tempDynDirectory, @"BasicAddition.dyn"); diff --git a/test/DynamoCoreWpfTests/WorkspaceOpeningTests.cs b/test/DynamoCoreWpfTests/WorkspaceOpeningTests.cs index 35f9ee8547d..f19a9f8bf42 100644 --- a/test/DynamoCoreWpfTests/WorkspaceOpeningTests.cs +++ b/test/DynamoCoreWpfTests/WorkspaceOpeningTests.cs @@ -47,7 +47,9 @@ public void VerifyRegisteredHomeWorkspace() ViewModel.Model.EvaluationCompleted -= testXmlEvent; // Save to json in temp location - string tempPath = Path.Combine(Dynamo.UnitTestBase.TestDirectory, @"core\serialization\serialization_temp.dyn"); + string tempPath = Path.Combine(TempFolder, @"core\serialization\serialization_temp.dyn"); + Directory.CreateDirectory(Path.GetDirectoryName(tempPath)); + ViewModel.SaveAsCommand.Execute(tempPath); // Close workspace diff --git a/test/Engine/FFITarget/ExperimentalNodes.cs b/test/Engine/FFITarget/ExperimentalNodes.cs new file mode 100644 index 00000000000..585de86ff6f --- /dev/null +++ b/test/Engine/FFITarget/ExperimentalNodes.cs @@ -0,0 +1,24 @@ + +using System.Diagnostics.CodeAnalysis; + + +namespace FFITarget +{ + public static class ClassWithExperimentalMethod + { + [Experimental("FFI_1")] + public static string ExperimentalMethod() + { + return "I am an experimental node!"; + } + } + [Experimental("FFI_2")] + public static class ExperimentalClass + { + + public static string Method() + { + return "my owning class is experimental"; + } + } +} diff --git a/test/Engine/ProtoTest/Associative/MicroFeatureTests.cs b/test/Engine/ProtoTest/Associative/MicroFeatureTests.cs index 58771da87a4..a95a5a080ae 100644 --- a/test/Engine/ProtoTest/Associative/MicroFeatureTests.cs +++ b/test/Engine/ProtoTest/Associative/MicroFeatureTests.cs @@ -2840,8 +2840,8 @@ public void Test_Compare_Node_01() string s1 = "a = 1;"; string s2 = "a=(1);"; - ProtoCore.AST.Node s1Root = ProtoCore.Utils.ParserUtils.Parse(s1); - ProtoCore.AST.Node s2Root = ProtoCore.Utils.ParserUtils.Parse(s2); + ProtoCore.AST.Node s1Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s1, TestFrameWork.TestParserCore()).CodeBlockNode; + ProtoCore.AST.Node s2Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s2, TestFrameWork.TestParserCore()).CodeBlockNode; bool areEqual = s1Root.Equals(s2Root); Assert.AreEqual(areEqual, true); } @@ -2851,8 +2851,8 @@ public void Test_Compare_Node_02() { string s1 = "a = 1; b=2;"; string s2 = "a=(1) ; b = (2);"; - ProtoCore.AST.Node s1Root = ProtoCore.Utils.ParserUtils.Parse(s1); - ProtoCore.AST.Node s2Root = ProtoCore.Utils.ParserUtils.Parse(s2); + ProtoCore.AST.Node s1Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s1, TestFrameWork.TestParserCore()).CodeBlockNode; + ProtoCore.AST.Node s2Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s2, TestFrameWork.TestParserCore()).CodeBlockNode; bool areEqual = s1Root.Equals(s2Root); Assert.AreEqual(areEqual, true); } @@ -2862,8 +2862,8 @@ public void Test_Compare_Node_03() { string s1 = "a = 1; c = a+1;"; string s2 = "a = 1; c=a + 1;"; - ProtoCore.AST.Node s1Root = ProtoCore.Utils.ParserUtils.Parse(s1); - ProtoCore.AST.Node s2Root = ProtoCore.Utils.ParserUtils.Parse(s2); + ProtoCore.AST.Node s1Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s1, TestFrameWork.TestParserCore()).CodeBlockNode; + ProtoCore.AST.Node s2Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s2, TestFrameWork.TestParserCore()).CodeBlockNode; bool areEqual = s1Root.Equals(s2Root); Assert.AreEqual(areEqual, true); } @@ -2876,13 +2876,13 @@ public void ParseTypedIdentifier_AstNode() string s3 = "a : A.B.C;"; string s4 = "a : A.B.C = null;"; - var s1Root = ProtoCore.Utils.ParserUtils.Parse(s1); + var s1Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s1, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(s1Root); var typedNode = s1Root.Body[0] as TypedIdentifierNode; Assert.IsNotNull(typedNode); Assert.AreEqual("A", typedNode.datatype.Name); - s1Root = ProtoCore.Utils.ParserUtils.Parse(s2); + s1Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s2, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(s1Root); var ben = s1Root.Body[0] as BinaryExpressionNode; Assert.IsNotNull(ben); @@ -2890,13 +2890,13 @@ public void ParseTypedIdentifier_AstNode() Assert.IsNotNull(typedNode); Assert.AreEqual("A", typedNode.datatype.Name); - s1Root = ProtoCore.Utils.ParserUtils.Parse(s3); + s1Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s3, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(s1Root); typedNode = s1Root.Body[0] as TypedIdentifierNode; Assert.IsNotNull(typedNode); Assert.AreEqual("A.B.C", typedNode.datatype.Name); - s1Root = ProtoCore.Utils.ParserUtils.Parse(s4); + s1Root = ProtoCore.Utils.ParserUtils.ParseWithCore(s4, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(s1Root); ben = s1Root.Body[0] as BinaryExpressionNode; Assert.IsNotNull(ben); @@ -2918,14 +2918,14 @@ public void ParseTypedIdentifierWithRank_AstNode() string s7 = "a : A.B.C[][];"; string s8 = "a : A.B.C[][] = null;"; - var root = ProtoCore.Utils.ParserUtils.Parse(s1); + var root = ProtoCore.Utils.ParserUtils.ParseWithCore(s1, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); var typedNode = root.Body[0] as TypedIdentifierNode; Assert.IsNotNull(typedNode); Assert.AreEqual("A", typedNode.datatype.Name); Assert.AreEqual(1, typedNode.datatype.rank); - root = ProtoCore.Utils.ParserUtils.Parse(s2); + root = ProtoCore.Utils.ParserUtils.ParseWithCore(s2, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); var ben = root.Body[0] as BinaryExpressionNode; Assert.IsNotNull(ben); @@ -2934,14 +2934,14 @@ public void ParseTypedIdentifierWithRank_AstNode() Assert.AreEqual("A", typedNode.datatype.Name); Assert.AreEqual(1, typedNode.datatype.rank); - root = ProtoCore.Utils.ParserUtils.Parse(s3); + root = ProtoCore.Utils.ParserUtils.ParseWithCore(s3, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); typedNode = root.Body[0] as TypedIdentifierNode; Assert.IsNotNull(typedNode); Assert.AreEqual("A.B.C", typedNode.datatype.Name); Assert.AreEqual(1, typedNode.datatype.rank); - root = ProtoCore.Utils.ParserUtils.Parse(s4); + root = ProtoCore.Utils.ParserUtils.ParseWithCore(s4, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); ben = root.Body[0] as BinaryExpressionNode; Assert.IsNotNull(ben); @@ -2950,14 +2950,14 @@ public void ParseTypedIdentifierWithRank_AstNode() Assert.AreEqual("A.B.C", typedNode.datatype.Name); Assert.AreEqual(1, typedNode.datatype.rank); - root = ProtoCore.Utils.ParserUtils.Parse(s5); + root = ProtoCore.Utils.ParserUtils.ParseWithCore(s5, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); typedNode = root.Body[0] as TypedIdentifierNode; Assert.IsNotNull(typedNode); Assert.AreEqual("A", typedNode.datatype.Name); Assert.AreEqual(2, typedNode.datatype.rank); - root = ProtoCore.Utils.ParserUtils.Parse(s6); + root = ProtoCore.Utils.ParserUtils.ParseWithCore(s6, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); ben = root.Body[0] as BinaryExpressionNode; Assert.IsNotNull(ben); @@ -2966,14 +2966,14 @@ public void ParseTypedIdentifierWithRank_AstNode() Assert.AreEqual("A", typedNode.datatype.Name); Assert.AreEqual(2, typedNode.datatype.rank); - root = ProtoCore.Utils.ParserUtils.Parse(s7); + root = ProtoCore.Utils.ParserUtils.ParseWithCore(s7, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); typedNode = root.Body[0] as TypedIdentifierNode; Assert.IsNotNull(typedNode); Assert.AreEqual("A.B.C", typedNode.datatype.Name); Assert.AreEqual(2, typedNode.datatype.rank); - root = ProtoCore.Utils.ParserUtils.Parse(s8); + root = ProtoCore.Utils.ParserUtils.ParseWithCore(s8, TestFrameWork.TestParserCore()).CodeBlockNode; Assert.IsNotNull(root); ben = root.Body[0] as BinaryExpressionNode; Assert.IsNotNull(ben); diff --git a/test/Engine/ProtoTest/FFITests/CSFFIDispose.cs b/test/Engine/ProtoTest/FFITests/CSFFIDispose.cs index 3721f8039eb..9c19b8dfb9e 100644 --- a/test/Engine/ProtoTest/FFITests/CSFFIDispose.cs +++ b/test/Engine/ProtoTest/FFITests/CSFFIDispose.cs @@ -2907,14 +2907,6 @@ public void DisposeEnumWrapper() thisTest.Verify("x", Days.Monday); } - //Migrate this code into the test framework - private Subtree CreateSubTreeFromCode(Guid guid, string code) - { - var cbn = ProtoCore.Utils.ParserUtils.Parse(code); - var subtree = null == cbn ? new Subtree(null, guid) : new Subtree(cbn.Body, guid); - return subtree; - } - private void AssertValue(string varname, object value) { var mirror = astLiveRunner.InspectNodeValue(varname); diff --git a/test/Engine/ProtoTest/LiveRunnerTests/ChangeSetComputerTests.cs b/test/Engine/ProtoTest/LiveRunnerTests/ChangeSetComputerTests.cs index 1693875aa83..1f207bc2e2b 100644 --- a/test/Engine/ProtoTest/LiveRunnerTests/ChangeSetComputerTests.cs +++ b/test/Engine/ProtoTest/LiveRunnerTests/ChangeSetComputerTests.cs @@ -24,13 +24,6 @@ public override void Setup() runtimeCore = new RuntimeCore(new Heap()); } - private Subtree CreateSubTreeFromCode(Guid guid, string code) - { - var cbn = ProtoCore.Utils.ParserUtils.Parse(code); - var subtree = null == cbn ? new Subtree(null, guid) : new Subtree(cbn.Body, guid); - return subtree; - } - [Test] public void TestAddedNodes01() { diff --git a/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs b/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs index b5ba5bf21c8..96abbb7862c 100644 --- a/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs +++ b/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs @@ -29,14 +29,14 @@ public override void TearDown() liveRunner.Dispose(); } - private void UpdateDsInterpreter(ProtoScript.Runners.LiveRunner liverunner, string code) + private void UpdateDsInterpreter(string code) { Guid guid = Guid.NewGuid(); List added = new List(); Subtree st = TestFrameWork.CreateSubTreeFromCode(guid, code); added.Add(st); var syncData = new GraphSyncData(null, added, null); - liverunner.UpdateGraph(syncData); + liveRunner.UpdateGraph(syncData); } @@ -155,7 +155,6 @@ public void GraphILTest_Assign01() GraphSyncData syncData = new GraphSyncData(null, addedList, null); // emit the DS code from the AST tree - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(syncData); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); @@ -174,7 +173,6 @@ public void GraphILTest_Assign01_AstInput() astList.Add(assign); // Update graph using AST node input - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(assign); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); @@ -207,7 +205,6 @@ public void GraphILTest_Assign01a() GraphSyncData syncData = new GraphSyncData(null, addedList, null); // emit the DS code from the AST tree - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(syncData); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); @@ -251,7 +248,6 @@ public void GraphILTest_Assign02() GraphSyncData syncData = new GraphSyncData(null, addedList, null); // emit the DS code from the AST tree - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(syncData); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); @@ -276,7 +272,6 @@ public void GraphILTest_Assign02_AstInput() ProtoCore.DSASM.Operator.assign); // emit the DS code from the AST tree - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(assign); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); @@ -321,7 +316,6 @@ public void GraphILTest_Assign03_astInput() // update graph with ast input CodeBlockNode cNode = new CodeBlockNode(); cNode.Body = astList; - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(cNode); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("b"); @@ -340,8 +334,6 @@ public void GraphILTest_Assign04_astInput() // executes it //////////////////////////////////////////////////////////////////// - liveRunner = new ProtoScript.Runners.LiveRunner(); - // Build the AST trees ProtoCore.AST.AssociativeAST.BinaryExpressionNode assign1 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( new ProtoCore.AST.AssociativeAST.IdentifierNode("a"), @@ -400,7 +392,6 @@ public void GraphILTest_Assign05() // executes updated graph //////////////////////////////////////////////////////////////////// - liveRunner = new ProtoScript.Runners.LiveRunner(); List astList = new List(); // Build the AST trees @@ -503,7 +494,6 @@ public void GraphILTest_ModifiedNode01() // execute updated graph (cylcic dependency should not occur) //////////////////////////////////////////////////////////////////// - liveRunner = new ProtoScript.Runners.LiveRunner(); List astList = new List(); ProtoCore.AST.AssociativeAST.BinaryExpressionNode assign0 = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode( @@ -596,10 +586,8 @@ public void GraphILTest_ModifiedNode01() [Test] public void TestDeltaExpression_01() { - liveRunner = new ProtoScript.Runners.LiveRunner(); - // emit the DS code from the AST tree - UpdateDsInterpreter(liveRunner,"a=10;"); + UpdateDsInterpreter("a=10;"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().Data == 10); @@ -607,7 +595,7 @@ public void TestDeltaExpression_01() //string o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - UpdateDsInterpreter(liveRunner,"c=20;"); + UpdateDsInterpreter("c=20;"); mirror = liveRunner.InspectNodeValue("c"); Assert.IsTrue((Int64)mirror.GetData().Data == 20); @@ -617,7 +605,7 @@ public void TestDeltaExpression_01() //string o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - UpdateDsInterpreter(liveRunner,"b = a+c;"); + UpdateDsInterpreter("b = a+c;"); mirror = liveRunner.InspectNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().Data == 10); @@ -629,7 +617,7 @@ public void TestDeltaExpression_01() //o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - UpdateDsInterpreter(liveRunner,"c= 30;"); + UpdateDsInterpreter("c= 30;"); mirror = liveRunner.InspectNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().Data == 10); @@ -644,10 +632,8 @@ public void TestDeltaExpression_01() [Test] public void TestDeltaExpression_02() { - liveRunner = new ProtoScript.Runners.LiveRunner(); - // emit the DS code from the AST tree - UpdateDsInterpreter(liveRunner,"x=99;"); + UpdateDsInterpreter("x=99;"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("x"); Assert.IsTrue((Int64)mirror.GetData().Data == 99); @@ -655,17 +641,15 @@ public void TestDeltaExpression_02() //string o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - UpdateDsInterpreter(liveRunner,"y=x;"); + UpdateDsInterpreter("y=x;"); mirror = liveRunner.InspectNodeValue("y"); Assert.IsTrue((Int64)mirror.GetData().Data == 99); mirror = liveRunner.InspectNodeValue("x"); Assert.IsTrue((Int64)mirror.GetData().Data == 99); - //string o = liveRunner.GetCoreDump(); - // emit the DS code from the AST tree - UpdateDsInterpreter(liveRunner, "x = 100;"); + UpdateDsInterpreter("x = 100;"); mirror = liveRunner.InspectNodeValue("x"); Assert.IsTrue((Int64)mirror.GetData().Data == 100); @@ -677,10 +661,8 @@ public void TestDeltaExpression_02() [Category("PortToCodeBlocks")] public void TestDeltaExpressionFFI_01() { - liveRunner = new ProtoScript.Runners.LiveRunner(); - - UpdateDsInterpreter(liveRunner, @"import (""FFITarget.dll"");"); - UpdateDsInterpreter(liveRunner, "p = DummyPoint.ByCoordinates(10,10,10);"); + UpdateDsInterpreter(@"import (""FFITarget.dll"");"); + UpdateDsInterpreter("p = DummyPoint.ByCoordinates(10,10,10);"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("p"); @@ -689,14 +671,14 @@ public void TestDeltaExpressionFFI_01() // newPoint = p.Translate(1,2,3); //============================================== - UpdateDsInterpreter(liveRunner, "newPoint = p.Translate(1,2,3);"); + UpdateDsInterpreter("newPoint = p.Translate(1,2,3);"); mirror = liveRunner.InspectNodeValue("newPoint"); //============================================== // Build a binary expression to retirieve the x property // xval = newPoint.X //============================================== - UpdateDsInterpreter(liveRunner, "xval = newPoint.X;"); + UpdateDsInterpreter("xval = newPoint.X;"); mirror = liveRunner.InspectNodeValue("xval"); //============================================== @@ -714,13 +696,8 @@ public void TestDeltaExpressionFFI_01() [Category("PortToCodeBlocks")] public void TestDeltaExpressionFFI_02() { - liveRunner = new ProtoScript.Runners.LiveRunner(); - - //string code = @"class Point{ X : double; constructor ByCoordinates(x : double, y : double, z : double){X = x;} def Translate(x : double, y : double, z : double){return = Point.ByCoordinates(11,12,13);} }"; - - //liveRunner.UpdateCmdLineInterpreter(code); - UpdateDsInterpreter(liveRunner, @"import (""FFITarget.dll"");"); - UpdateDsInterpreter(liveRunner, "p = DummyPoint.ByCoordinates(10,10,10);"); + UpdateDsInterpreter(@"import (""FFITarget.dll"");"); + UpdateDsInterpreter("p = DummyPoint.ByCoordinates(10,10,10);"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("p"); @@ -728,7 +705,7 @@ public void TestDeltaExpressionFFI_02() // Build a binary expression to retirieve the x property // xval = newPoint.X //============================================== - UpdateDsInterpreter(liveRunner,"xval = p.X;"); + UpdateDsInterpreter("xval = p.X;"); mirror = liveRunner.InspectNodeValue("xval"); //============================================== @@ -745,7 +722,7 @@ public void TestDeltaExpressionFFI_02() // newPoint = p.Translate(1,2,3); //============================================== - UpdateDsInterpreter(liveRunner,"p = p.Translate(1,2,3);"); + UpdateDsInterpreter("p = p.Translate(1,2,3);"); mirror = liveRunner.InspectNodeValue("p"); @@ -784,7 +761,6 @@ public void GraphILTest_ComplexWatch01() GraphSyncData syncData = new GraphSyncData(null, addedList, null); // emit the DS code from the AST tree - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(syncData); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); @@ -821,7 +797,6 @@ public void GraphILTest_DeletedNode01() GraphSyncData syncData = new GraphSyncData(null, addedList, null); // emit the DS code from the AST tree - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(syncData); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); @@ -919,7 +894,6 @@ public void GraphILTest_DeletedBinaryExpresionDoesNotEffectReferences() GraphSyncData syncData = new GraphSyncData(null, addedList, null); // emit the DS code from the AST tree - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.UpdateGraph(syncData); // Execute and verify c = true @@ -997,7 +971,6 @@ public void TestAdd01() // in which add order, LiveRunner should get the same result. for (int i = 0; i < shuffleCount; ++i) { - ILiveRunner liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.ResetVMAndResyncGraph(new List { "FFITarget.dll" }); index = index.OrderBy(_ => randomGen.Next()); @@ -2415,7 +2388,6 @@ public void TestRedefineFunctionName02() [Test] public void TestFunctionObjectInApply() { - liveRunner = new ProtoScript.Runners.LiveRunner(); liveRunner.ResetVMAndResyncGraph(new List { "DesignScriptBuiltin.dll", "FunctionObject.ds" }); string code = @" def foo(x,y ) { return = x + y; } diff --git a/test/Engine/ProtoTest/ProtoAST/RoundTripTests.cs b/test/Engine/ProtoTest/ProtoAST/RoundTripTests.cs index eae3ec63cf0..0429d4e885c 100644 --- a/test/Engine/ProtoTest/ProtoAST/RoundTripTests.cs +++ b/test/Engine/ProtoTest/ProtoAST/RoundTripTests.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NUnit.Framework; using ProtoCore.DSASM.Mirror; +using ProtoTestFx.TD; namespace ProtoTest.ProtoAST { @@ -312,7 +313,7 @@ public void TestAstToCode() foreach (var stmt in statements) { - var cbn = ProtoCore.Utils.ParserUtils.Parse(stmt); + var cbn = ProtoCore.Utils.ParserUtils.ParseWithCore(stmt, TestFrameWork.TestParserCore()).CodeBlockNode; if (cbn != null) { foreach (var item in cbn.Body) @@ -328,7 +329,7 @@ public void TestAstToCode() foreach (var stmt in new_statements) { - var cbn = ProtoCore.Utils.ParserUtils.Parse(stmt); + var cbn = ProtoCore.Utils.ParserUtils.ParseWithCore(stmt, TestFrameWork.TestParserCore()).CodeBlockNode; if (cbn != null) { foreach (var item in cbn.Body) diff --git a/test/Engine/ProtoTest/TD/MultiLangTests/StringTest.cs b/test/Engine/ProtoTest/TD/MultiLangTests/StringTest.cs index 9fcf54a255c..ae2bc905365 100644 --- a/test/Engine/ProtoTest/TD/MultiLangTests/StringTest.cs +++ b/test/Engine/ProtoTest/TD/MultiLangTests/StringTest.cs @@ -567,5 +567,70 @@ public void TestLocalizedStringInCode() thisTest.RunScriptSource(code); thisTest.Verify("x", "中文字符"); } + [Test] + public void TestStringFromArrayFormat() { + String code = + @" +import(""FFITarget.dll""); + a = ClassFunctionality.ClassFunctionality(1); + arr1 = [1,2]; + arr2 = [1.100005,a]; + arr3 = [5,a,1.1]; + b1 = ""a"" + __ToStringFromArrayAndFormat(arr1,""F2""); + b2 = ""a"" + __ToStringFromArrayAndFormat(arr2, ""G3""); + b3 = __ToStringFromArrayAndFormat(arr3, ""B""); + "; + thisTest.RunScriptSource(code); + thisTest.Verify("b1", "a[1.00,2.00]"); + thisTest.Verify("b2", "a[1.1,FFITarget.ClassFunctionality]"); + //TODO note this difference between array and object conversion - if any format specifier is invalid the entire array conversion fails. + //how should this behave? + thisTest.Verify("b3", "Format specifier was invalid." ); + + } + [Test] + public void TestStringFromObjectFormat() + { + String code = + @" +import(""FFITarget.dll""); + a = ClassFunctionality.ClassFunctionality(1); + arr1 = [1,2]; + arr2 = [1.100005,a]; + arr3 = [5,a,1.1]; + b1 = __ToStringFromObjectAndFormat(arr1,""F2""); + b2 = __ToStringFromObjectAndFormat(arr2, ""G3""); + b3 = __ToStringFromObjectAndFormat(arr3, ""B""); + "; + thisTest.RunScriptSource(code); + thisTest.Verify("b1", new string[] { "1.00", "2.00" }); + thisTest.Verify("b2", new string[]{"1.1","FFITarget.ClassFunctionality"}); + thisTest.Verify("b3", new string[] { "101", "FFITarget.ClassFunctionality","Format specifier was invalid." }); + } + [Test] + public void TestStringFromObjectFormat_Prefs1() + { + String code = + @" + b1 = __ToStringFromObjectAndFormat(1.123456789, ""DynamoPreferencesNumberFormat""); + "; + thisTest.RunScriptSource(code); + thisTest.Verify("b1", "1.123"); + } + [Test] + public void TestStringFromObjectFormat_Prefs2() + { + var oldpref = ProtoCore.Mirror.MirrorData.PrecisionFormat; + ProtoCore.Mirror.MirrorData.PrecisionFormat = "F6"; + String code = + @" + b1 = __ToStringFromObjectAndFormat(1.123456789, ""DynamoPreferencesNumberFormat""); + "; + thisTest.RunScriptSource(code); + thisTest.Verify("b1", "1.123457"); + //reset + ProtoCore.Mirror.MirrorData.PrecisionFormat = oldpref; + + } } } diff --git a/test/Engine/ProtoTest/UtilsTests/ImperativeAstVistorTest.cs b/test/Engine/ProtoTest/UtilsTests/ImperativeAstVistorTest.cs index 5f9fac3ad1c..7c7f095e889 100644 --- a/test/Engine/ProtoTest/UtilsTests/ImperativeAstVistorTest.cs +++ b/test/Engine/ProtoTest/UtilsTests/ImperativeAstVistorTest.cs @@ -5,6 +5,7 @@ using ProtoCore.AST.ImperativeAST; using ProtoCore.SyntaxAnalysis; using ProtoCore.Utils; +using ProtoTestFx.TD; namespace ProtoTest.UtilsTests { @@ -72,13 +73,13 @@ private CodeBlockNode GetCodeBlockNode(ProtoCore.AST.AssociativeAST.CodeBlockNod private void TestMapping(string originalCode, string expectedCode) { - var originalResult = ParserUtils.Parse(originalCode); + var originalResult = ParserUtils.ParseWithCore(originalCode, TestFrameWork.TestParserCore()).CodeBlockNode; var cbn = GetCodeBlockNode(originalResult); var mappedCBN = cbn.Accept(replacer) as CodeBlockNode; Assert.IsNotNull(mappedCBN); Assert.IsTrue(mappedCBN.Body.Any()); - var expectedResult = ParserUtils.Parse(expectedCode); + var expectedResult = ParserUtils.ParseWithCore(expectedCode, TestFrameWork.TestParserCore()).CodeBlockNode; var expectedCBN = GetCodeBlockNode(expectedResult); Assert.IsNotNull(expectedCBN); Assert.IsTrue(expectedCBN.Body.Any()); diff --git a/test/Engine/ProtoTestFx/Properties/AssemblyInfo.cs b/test/Engine/ProtoTestFx/Properties/AssemblyInfo.cs index 4196c0f97fe..a87ad67861e 100644 --- a/test/Engine/ProtoTestFx/Properties/AssemblyInfo.cs +++ b/test/Engine/ProtoTestFx/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -15,3 +16,4 @@ "a71ab26a84ef057963dbe6889a22e04196066cb4d7ca3eeb52adb110d0a14bf39a786acf7f4b50" + "b26155bc")] */ +[assembly: InternalsVisibleTo("ProtoTest")] diff --git a/test/Engine/ProtoTestFx/TestFrameWork.cs b/test/Engine/ProtoTestFx/TestFrameWork.cs index 4dc63a9e0f3..caf5e6467c3 100644 --- a/test/Engine/ProtoTestFx/TestFrameWork.cs +++ b/test/Engine/ProtoTestFx/TestFrameWork.cs @@ -43,6 +43,17 @@ public TestFrameWork() runner = new ProtoScriptRunner(); } + internal static ProtoCore.Core TestParserCore() + { + var core = new ProtoCore.Core(new ProtoCore.Options()) + { + ParsingMode = ProtoCore.ParseMode.AllowNonAssignment, + IsParsingPreloadedAssembly = false, + IsParsingInTestMode = true, + }; + return core; + } + /// /// Execute the DS code and verifies the results given a list of verification pairs /// @@ -906,7 +917,7 @@ public static void AssertValue(MirrorData data, object value) public static Subtree CreateSubTreeFromCode(Guid guid, string code) { - var cbn = ProtoCore.Utils.ParserUtils.Parse(code); + var cbn = ProtoCore.Utils.ParserUtils.ParseWithCore(code, TestParserCore()).CodeBlockNode; var subtree = null == cbn ? new Subtree(null, guid) : new Subtree(cbn.Body, guid); subtree.DeltaComputation = false; return subtree; diff --git a/test/Libraries/WorkflowTests/GeometryDefectTests.cs b/test/Libraries/WorkflowTests/GeometryDefectTests.cs index 820840bbdf1..5074c8447a4 100644 --- a/test/Libraries/WorkflowTests/GeometryDefectTests.cs +++ b/test/Libraries/WorkflowTests/GeometryDefectTests.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using Autodesk.DesignScript.Geometry; @@ -587,6 +587,17 @@ public void NurbsSurfaceWeights_MAGN_7970() } + [Test] + public void PolyCurveByPointsExtraLargeScaleSetting_Returns3Curves() + { + string openPath = Path.Combine(TestDirectory, @"core\PolycurveByPoints.dyn"); + RunModel(openPath); + + var polyCurve = GetPreviewValue("c730df73-7ce9-43c1-8f97-87608fb48e43") as PolyCurve; + Assert.IsNotNull(polyCurve); + Assert.AreEqual(3, polyCurve.NumberOfCurves); + } + [Test] [Category("Failure")] public void LargeModel_Intersection_MAGN_9320() diff --git a/test/System/IntegrationTests/CallsiteRegen.cs b/test/System/IntegrationTests/CallsiteRegen.cs index 090d9b3a418..fb0ae2898ce 100644 --- a/test/System/IntegrationTests/CallsiteRegen.cs +++ b/test/System/IntegrationTests/CallsiteRegen.cs @@ -1,4 +1,4 @@ -using DynamoServices; +using DynamoServices; using NUnit.Framework; using ProtoScript.Runners; using ProtoTestFx.TD; @@ -24,6 +24,7 @@ public void Setup() { testFx = new TestFrameWork(); astLiveRunner = new ProtoScript.Runners.LiveRunner(); + astLiveRunner.Core.IsParsingInTestMode = true; FFITarget.IncrementerTracedClass.ResetForNextTest(); } diff --git a/test/Tools/NodeDocumentationMarkdownGeneratorTests/MarkdownGeneratorCommandTests.cs b/test/Tools/NodeDocumentationMarkdownGeneratorTests/MarkdownGeneratorCommandTests.cs index b171d96b890..2cf6a6d8844 100644 --- a/test/Tools/NodeDocumentationMarkdownGeneratorTests/MarkdownGeneratorCommandTests.cs +++ b/test/Tools/NodeDocumentationMarkdownGeneratorTests/MarkdownGeneratorCommandTests.cs @@ -164,7 +164,7 @@ public void ProducesCorrectOutputFromCoreDirectory_preloadedbinaries() FromDirectoryCommand.HandleDocumentationFromDirectory(opts); var generatedFileNames = tempDirectory.GetFiles().Select(x => x.Name); - Assert.AreEqual(754, generatedFileNames.Count()); + Assert.AreEqual(756, generatedFileNames.Count()); } [Test] @@ -225,7 +225,9 @@ public void DictionaryContentIsFoundCorrectlyForCoreNodes() // Arrange var testOutputDirName = "TestMdOutput_CoreNodeModels"; - + //these are new files/nodes so there is no dictionary content fo them. + var filesToSkip = new string[] { "CoreNodeModels.FormattedStringFromObject", "CoreNodeModels.FormattedStringFromArray" }; + var coreNodeModelsDll = Path.Combine(DynamoCoreNodesDir, CORENODEMODELS_DLL_NAME); Assert.That(File.Exists(coreNodeModelsDll)); @@ -250,8 +252,8 @@ public void DictionaryContentIsFoundCorrectlyForCoreNodes() //assert that the generated markdown files all contain an "indepth section" from the dictionary entry, which means //they were all found. - - Assert.True(generatedFileNames.Where(x=>Path.GetExtension(x).Contains("md")).All(x => File.ReadAllText(x).ToLower().Contains("in depth"))); + var generatedFileNamesSubset = generatedFileNames.Where(x => !filesToSkip.Contains(Path.GetFileNameWithoutExtension(x))); + Assert.True(generatedFileNamesSubset.Where(x=>Path.GetExtension(x).Contains("md")).All(x => File.ReadAllText(x).ToLower().Contains("in depth"))); } diff --git a/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FormattedStringFromArray.md b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FormattedStringFromArray.md new file mode 100644 index 00000000000..21be3f4831e --- /dev/null +++ b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FormattedStringFromArray.md @@ -0,0 +1,5 @@ +## String from Array And Format - Documentation +This documentation file is auto generated by NodeDocumentationMarkdownGenerator, Version=3.4.0.6676, Culture=neutral, PublicKeyToken=null. + +For more information about adding documentation to nodes see https://github.com/DynamoDS/Dynamo/wiki/Create-and-Add-Custom-Documentation-to-Nodes + diff --git a/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FormattedStringFromObject.md b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FormattedStringFromObject.md new file mode 100644 index 00000000000..1b39c296071 --- /dev/null +++ b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FormattedStringFromObject.md @@ -0,0 +1,5 @@ +## Formatted String From Object - Documentation +This documentation file is auto generated by NodeDocumentationMarkdownGenerator, Version=3.4.0.6676, Culture=neutral, PublicKeyToken=null. + +For more information about adding documentation to nodes see https://github.com/DynamoDS/Dynamo/wiki/Create-and-Add-Custom-Documentation-to-Nodes + diff --git a/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromArray.md b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromArray.md index 53fe56fd7ab..0b7f7c81296 100644 --- a/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromArray.md +++ b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromArray.md @@ -1,5 +1,5 @@ -## String from Array - Documentation -This documentation file is auto generated by NodeDocumentationMarkdownGenerator, Version=2.13.0.2212, Culture=neutral, PublicKeyToken=null. +## String From Array - Documentation +This documentation file is auto generated by NodeDocumentationMarkdownGenerator, Version=3.4.0.6676, Culture=neutral, PublicKeyToken=null. For more information about adding documentation to nodes see https://github.com/DynamoDS/Dynamo/wiki/Create-and-Add-Custom-Documentation-to-Nodes diff --git a/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromObject.md b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromObject.md index 62127b5e2a0..b8f0f9e51f5 100644 --- a/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromObject.md +++ b/test/Tools/docGeneratorTestFiles/TestMdOutput_CoreNodeModels/CoreNodeModels.FromObject.md @@ -1,5 +1,5 @@ -## String from Object - Documentation -This documentation file is auto generated by NodeDocumentationMarkdownGenerator, Version=2.13.0.2212, Culture=neutral, PublicKeyToken=null. +## String From Object - Documentation +This documentation file is auto generated by NodeDocumentationMarkdownGenerator, Version=3.4.0.6676, Culture=neutral, PublicKeyToken=null. For more information about adding documentation to nodes see https://github.com/DynamoDS/Dynamo/wiki/Create-and-Add-Custom-Documentation-to-Nodes diff --git a/test/core/string/TestNumberToString_normal_numericformat.dyn b/test/core/string/TestNumberToString_normal_numericformat.dyn new file mode 100644 index 00000000000..bfc672d6e60 --- /dev/null +++ b/test/core/string/TestNumberToString_normal_numericformat.dyn @@ -0,0 +1,1195 @@ +{ + "Uuid": "3c9d0464-8643-5ffe-96e5-ab1769818209", + "IsCustomNode": false, + "Description": "", + "Name": "TestNumberToString_normal_numericformat", + "ElementResolver": { + "ResolutionMap": { + "DesignScript.Builtin.Dictionary": { + "Key": "DesignScript.Builtin.Dictionary", + "Value": "DesignScriptBuiltin.dll" + } + } + }, + "Inputs": [], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "CoreNodeModels.Input.DoubleInput, CoreNodeModels", + "NumberType": "Double", + "Id": "b6fbfc57f9a14609912d3824f806f5b8", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "a5a3fa26f7dc45a39a173e9928d26464", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Creates a number", + "InputValue": 123456789.0 + }, + { + "ConcreteType": "CoreNodeModels.Input.DoubleInput, CoreNodeModels", + "NumberType": "Double", + "Id": "9b74289ccd7242749bfbb6b56d2774bb", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "14d00072325d4ff4a55b64a6e794da3a", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Creates a number", + "InputValue": -123456789.0 + }, + { + "ConcreteType": "CoreNodeModels.Input.DoubleInput, CoreNodeModels", + "NumberType": "Double", + "Id": "075ecd65d9b44489b09041a309f0b794", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "3c7008e844154852a868d0360bd5531b", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Creates a number", + "InputValue": 3.46 + }, + { + "ConcreteType": "CoreNodeModels.Input.DoubleInput, CoreNodeModels", + "NumberType": "Double", + "Id": "1ce66222719e414eb4e393544239f4e5", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "e5afe6443c5e4dc58e7a1fb8b04bb7ad", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Creates a number", + "InputValue": -3.46 + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "Id": "d3fb3523609f456fbc233dcae1d48732", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "286987f4a6ab4f9580be045e75e6d3c2", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "8b2a3051fe5248e0a03e5d53fe56e0d9", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "Id": "ae77e756519e43ad9ac1861827601e22", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "422fe9f197a64b36b0f981800a6d3c21", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "8e370b548b2f4075b769fc4c5276af50", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "Id": "1ec6ed7b75a64bfcba77b81f82ed8f50", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "6597820795a745789041ff10a3c1c806", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "9774fa5969bc42d490126d1e6b18bc08", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "680caae1a3ea4095803b2493571cce7a", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "cd3452ad72e94a659eed9d147cff3554", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "6cb36d659e7a4c9791373741e1a07ec3", + "Name": "useNumericFormat", + "Description": "should the numeric precision format be used when converting doubles (disabled)", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "b7a7cd5475b14f069395f5fd4f760779", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "Id": "8b3258a0ac584bf5a3261ca66aaa788d", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "7d5f8dd21d0f493da25b9002273d5e80", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "832846b8799d4fe7ae1ac6c9901608cc", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "Id": "5e4770f0e3cc417f92776a8b8b83b533", + "NodeType": "CodeBlockNode", + "Inputs": [], + "Outputs": [ + { + "Id": "b45e2569af7049288b2b0aa558d3a7c3", + "Name": "", + "Description": "Value of expression at line 1", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly", + "Code": "{\"key\":\"0.000000000\"};" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "Id": "662c8c937a80459b971650b87a6fcfe4", + "NodeType": "CodeBlockNode", + "Inputs": [], + "Outputs": [ + { + "Id": "bd621135843f4e32b20128fabb5b349a", + "Name": "", + "Description": "Value of expression at line 1", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly", + "Code": "[\"F3\",\"F1\",\"G\",\"B\"];" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "Id": "02c1b3e721dd4941ac15d8461b154a49", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "2c2b4228f1f74ccc9ab191dbcddeef2b", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "3f9edc8af38c40468c872736e7b6dbdb", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "Id": "a74956c410ce41b7b43a195dad0e38b5", + "NodeType": "CodeBlockNode", + "Inputs": [], + "Outputs": [ + { + "Id": "eb1a9bcb42934dc293bfc3350ef15a85", + "Name": "", + "Description": "Value of expression at line 1", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly", + "Code": "{\"key\":\"5\"};" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "f776aa328bd043ee8ec082b49bffe6a3", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "a9b1075f9ebb426694446b6f97308228", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "28bc476b868f4346aacf08498000189f", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values (disabled)", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "484311c3e33d48208bfe70baabef9539", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "Id": "3a45200d74bb4ece97d0fb1bb03ec973", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "8c04eff2dbe74b5bbe8e23b5878a1372", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "77435ecf09c347308760f8d9514afd03", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "Id": "e0e5a49813ef41e8bbdcaf9844fd6e86", + "NodeType": "CodeBlockNode", + "Inputs": [], + "Outputs": [ + { + "Id": "2a84b826723841daabe17488bfa4696e", + "Name": "", + "Description": "Value of expression at line 1", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly", + "Code": "5;" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "9c16d38e96ad477dab6fad80d8f28f74", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "065e1a4cbceb41f09a22e802fc9dbe15", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "47f0dc27e828410cbaa454c9c29d0e67", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "1b705b6125b5443195d274ecac8cf387", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "2451b0dca8e54fa98c17fbb6f5aa9c80", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "63692e1c01524a77a4e90dcb64e7ea77", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "1d6f9331f32d43fc97b50d78fab08250", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "3f24ba400c0946f3b530b795f7b07be8", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "c8801f22da1943cab36bd03806cc20cd", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "bb5682d9c8e44bcc92b842ef0d62d3a1", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "7b2cac575b6143b5bc7f3fd275240764", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "dd1cde67a44643578a4f79bbffcec458", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "1bbe9fbe696945ab801c0428693a34c1", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "fa02fe5e367b41a286926a6177e390cd", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "1bdd311b836d48afa8eb87b67e9f7127", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "763a0f6364f24fc4ab60eb421975b941", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "2194d136e214459b8d04f11e5d39f0db", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "4833cd518b874c648878cda9793b7bfe", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "52f0dff47f29434b8709fb228a2e2e51", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "069559e4e385493980c709b0861e8186", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.Input.DoubleInput, CoreNodeModels", + "NumberType": "Double", + "Id": "275e748e781c45d8895214258a51ab90", + "NodeType": "NumberInputNode", + "Inputs": [], + "Outputs": [ + { + "Id": "487ea80b7ca247de898094a2839611e3", + "Name": "", + "Description": "Double", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Creates a number", + "InputValue": 123456789.0 + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromObject, CoreNodeModels", + "Id": "df29ded8e49c4755be88d57e4bda23d9", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "bb7a79b378b549c6aede58d93dc2eb37", + "Name": "object", + "Description": "Object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "6bfb6b40654845b8bf33602a6d179536", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "4140df13525c4d9bb934c8fb6d46a328", + "Name": "string", + "Description": "String representation of the object", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an object to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 184.0, + "WatchHeight": 102.0, + "Id": "92884c6c303641299316c83273ce718c", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "019f22c1b40844b3a7bbc3a551be6310", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "4022383166d94960b5b0e19c43a36148", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 200.0, + "WatchHeight": 200.0, + "Id": "cd8ed092d8a04f3e8a0137d70c3833dd", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "914170b3ab1842cba4f5bb72498f5db5", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "0e62fb306b7e43b2bdcc1a7619a71b9e", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + } + ], + "Connectors": [ + { + "Start": "a5a3fa26f7dc45a39a173e9928d26464", + "End": "065e1a4cbceb41f09a22e802fc9dbe15", + "Id": "05d4a850182c442a92250b00a02f92f5", + "IsHidden": "False" + }, + { + "Start": "14d00072325d4ff4a55b64a6e794da3a", + "End": "63692e1c01524a77a4e90dcb64e7ea77", + "Id": "3f607494975b415f8397960344a70028", + "IsHidden": "False" + }, + { + "Start": "3c7008e844154852a868d0360bd5531b", + "End": "bb5682d9c8e44bcc92b842ef0d62d3a1", + "Id": "09ae3ab31ba44679b93a86f677a6a870", + "IsHidden": "False" + }, + { + "Start": "e5afe6443c5e4dc58e7a1fb8b04bb7ad", + "End": "fa02fe5e367b41a286926a6177e390cd", + "Id": "aa6e857c034340a8a5748027b15c19cd", + "IsHidden": "False" + }, + { + "Start": "b7a7cd5475b14f069395f5fd4f760779", + "End": "7d5f8dd21d0f493da25b9002273d5e80", + "Id": "3192964ec1f745c584ceab0aabcb501c", + "IsHidden": "False" + }, + { + "Start": "b45e2569af7049288b2b0aa558d3a7c3", + "End": "cd3452ad72e94a659eed9d147cff3554", + "Id": "108c352a91fd4048935715e2e3e59b94", + "IsHidden": "False" + }, + { + "Start": "bd621135843f4e32b20128fabb5b349a", + "End": "28bc476b868f4346aacf08498000189f", + "Id": "91c74477d6564065956c24a0a61daad5", + "IsHidden": "False" + }, + { + "Start": "bd621135843f4e32b20128fabb5b349a", + "End": "6cb36d659e7a4c9791373741e1a07ec3", + "Id": "80a067f1cf8a4985988b16b31dd1dbb1", + "IsHidden": "False" + }, + { + "Start": "bd621135843f4e32b20128fabb5b349a", + "End": "47f0dc27e828410cbaa454c9c29d0e67", + "Id": "e09be04861044084b200f58bb9ff4e0c", + "IsHidden": "False" + }, + { + "Start": "bd621135843f4e32b20128fabb5b349a", + "End": "1d6f9331f32d43fc97b50d78fab08250", + "Id": "739924ee07ab4156b85f39253b4985af", + "IsHidden": "False" + }, + { + "Start": "bd621135843f4e32b20128fabb5b349a", + "End": "7b2cac575b6143b5bc7f3fd275240764", + "Id": "0a57f5cb0e204fdda7664165b2653abc", + "IsHidden": "False" + }, + { + "Start": "bd621135843f4e32b20128fabb5b349a", + "End": "1bdd311b836d48afa8eb87b67e9f7127", + "Id": "ae0a23488ea549b8a612b307a5c77a16", + "IsHidden": "False" + }, + { + "Start": "bd621135843f4e32b20128fabb5b349a", + "End": "52f0dff47f29434b8709fb228a2e2e51", + "Id": "3fbd3973e22048d9bfad8450520d8aa9", + "IsHidden": "False" + }, + { + "Start": "eb1a9bcb42934dc293bfc3350ef15a85", + "End": "a9b1075f9ebb426694446b6f97308228", + "Id": "85a1759a56cd40f9a754dc38d5b92b61", + "IsHidden": "False" + }, + { + "Start": "484311c3e33d48208bfe70baabef9539", + "End": "8c04eff2dbe74b5bbe8e23b5878a1372", + "Id": "a97a202dcb524a98ae46476c819c8448", + "IsHidden": "False" + }, + { + "Start": "2a84b826723841daabe17488bfa4696e", + "End": "4833cd518b874c648878cda9793b7bfe", + "Id": "b004d9b62ce247f592ec9c86dff2d1a3", + "IsHidden": "False" + }, + { + "Start": "1b705b6125b5443195d274ecac8cf387", + "End": "286987f4a6ab4f9580be045e75e6d3c2", + "Id": "9ebcc1f2b85d4d9581ae33d6e01c9835", + "IsHidden": "False" + }, + { + "Start": "3f24ba400c0946f3b530b795f7b07be8", + "End": "422fe9f197a64b36b0f981800a6d3c21", + "Id": "3e1ff4c8f2484d4bb657f39ce3acdf76", + "IsHidden": "False" + }, + { + "Start": "dd1cde67a44643578a4f79bbffcec458", + "End": "6597820795a745789041ff10a3c1c806", + "Id": "a1ca444d97c94e869e4b236277258c2e", + "IsHidden": "False" + }, + { + "Start": "763a0f6364f24fc4ab60eb421975b941", + "End": "2c2b4228f1f74ccc9ab191dbcddeef2b", + "Id": "cf7beef7064841f2afd7abe19eda19e3", + "IsHidden": "False" + }, + { + "Start": "069559e4e385493980c709b0861e8186", + "End": "914170b3ab1842cba4f5bb72498f5db5", + "Id": "fa9c716ff76d4162a2fb4c45bf6aad00", + "IsHidden": "False" + }, + { + "Start": "487ea80b7ca247de898094a2839611e3", + "End": "bb7a79b378b549c6aede58d93dc2eb37", + "Id": "2a1fe23f82fb4f2d83975ffe29491012", + "IsHidden": "False" + }, + { + "Start": "4140df13525c4d9bb934c8fb6d46a328", + "End": "019f22c1b40844b3a7bbc3a551be6310", + "Id": "2a24a7679ba44adda65ee4bf0534d6c9", + "IsHidden": "False" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "EnableLegacyPolyCurveBehavior": true, + "Thumbnail": "", + "GraphDocumentationURL": null, + "ExtensionWorkspaceData": [ + { + "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670", + "Name": "Properties", + "Version": "3.0", + "Data": {} + } + ], + "Author": "None provided", + "Linting": { + "activeLinter": "None", + "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a", + "warningCount": 0, + "errorCount": 0 + }, + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": true, + "IsVisibleInDynamoLibrary": true, + "Version": "3.4.0.6676", + "RunType": "Manual", + "RunPeriod": "1000" + }, + "Camera": { + "Name": "_Background Preview", + "EyeX": -17.0, + "EyeY": 24.0, + "EyeZ": 50.0, + "LookX": 12.0, + "LookY": -13.0, + "LookZ": -58.0, + "UpX": 0.0, + "UpY": 1.0, + "UpZ": 0.0 + }, + "ConnectorPins": [], + "NodeViews": [ + { + "Id": "b6fbfc57f9a14609912d3824f806f5b8", + "Name": "Number", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 115.67426105668028, + "Y": -287.8456424997603 + }, + { + "Id": "9b74289ccd7242749bfbb6b56d2774bb", + "Name": "Number", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 64.33938073241075, + "Y": 39.70634987252754 + }, + { + "Id": "075ecd65d9b44489b09041a309f0b794", + "Name": "Number", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 115.67426105668028, + "Y": 623.7068471196142 + }, + { + "Id": "1ce66222719e414eb4e393544239f4e5", + "Name": "Number", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 52.367205920489596, + "Y": 907.8542090962671 + }, + { + "Id": "d3fb3523609f456fbc233dcae1d48732", + "Name": "Watch1", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 999.6928641254308, + "Y": -54.5580923127701 + }, + { + "Id": "ae77e756519e43ad9ac1861827601e22", + "Name": "Watch2", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 998.39733153422, + "Y": 246.587092661364 + }, + { + "Id": "1ec6ed7b75a64bfcba77b81f82ed8f50", + "Name": "Watch3", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 969.5559999591637, + "Y": 567.4236591317275 + }, + { + "Id": "680caae1a3ea4095803b2493571cce7a", + "Name": "String from Object2", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 721.1166494505987, + "Y": 1605.2830355613005 + }, + { + "Id": "8b3258a0ac584bf5a3261ca66aaa788d", + "Name": "Watch6", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 1040.1166494505987, + "Y": 1605.2830355613005 + }, + { + "Id": "5e4770f0e3cc417f92776a8b8b83b533", + "Name": "Code Block", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 365.5710819435785, + "Y": 1605.1105355613006 + }, + { + "Id": "662c8c937a80459b971650b87a6fcfe4", + "Name": "Code Block", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -475.8980754364303, + "Y": 754.2873402247715 + }, + { + "Id": "02c1b3e721dd4941ac15d8461b154a49", + "Name": "Watch4", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 969.5559999591637, + "Y": 880.4236591317275 + }, + { + "Id": "a74956c410ce41b7b43a195dad0e38b5", + "Name": "Code Block", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 353.82061073362206, + "Y": 1846.07157949955 + }, + { + "Id": "f776aa328bd043ee8ec082b49bffe6a3", + "Name": "String from Object2", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 710.8206107336221, + "Y": 1846.2440794995498 + }, + { + "Id": "3a45200d74bb4ece97d0fb1bb03ec973", + "Name": "Watch7", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 1032.8006474657432, + "Y": 1928.7051347432157 + }, + { + "Id": "e0e5a49813ef41e8bbdcaf9844fd6e86", + "Name": "Code Block", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -81.75799888567963, + "Y": 1303.8630016714806 + }, + { + "Id": "9c16d38e96ad477dab6fad80d8f28f74", + "Name": "String from Object And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 424.4515027871015, + "Y": -295.59369971031424 + }, + { + "Id": "2451b0dca8e54fa98c17fbb6f5aa9c80", + "Name": "String from Object And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 388.1005679987211, + "Y": 0.4483476842422647 + }, + { + "Id": "c8801f22da1943cab36bd03806cc20cd", + "Name": "String from Object And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 416.8217740245268, + "Y": 442.56509594756284 + }, + { + "Id": "1bbe9fbe696945ab801c0428693a34c1", + "Name": "String from Object And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 449.6756726974987, + "Y": 894.8451762576958 + }, + { + "Id": "2194d136e214459b8d04f11e5d39f0db", + "Name": "String from Object And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 511.71836089332555, + "Y": 1299.6245343442215 + }, + { + "Id": "275e748e781c45d8895214258a51ab90", + "Name": "Number", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 100.54811428273808, + "Y": -505.73875497749736 + }, + { + "Id": "df29ded8e49c4755be88d57e4bda23d9", + "Name": "String from Object And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 409.3253560131593, + "Y": -513.4868121880513 + }, + { + "Id": "92884c6c303641299316c83273ce718c", + "Name": "Watch0", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 884.798673288619, + "Y": -518.8107682252431 + }, + { + "Id": "cd8ed092d8a04f3e8a0137d70c3833dd", + "Name": "Watch5", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 983.0477947579423, + "Y": 1253.668472804629 + } + ], + "Annotations": [], + "X": -169.52963948937793, + "Y": -578.7067270043049, + "Zoom": 0.6459837027060035 + } +} \ No newline at end of file diff --git a/test/core/string/TestStringFromArrayPreview_numericformat.dyn b/test/core/string/TestStringFromArrayPreview_numericformat.dyn new file mode 100644 index 00000000000..bfdad40e514 --- /dev/null +++ b/test/core/string/TestStringFromArrayPreview_numericformat.dyn @@ -0,0 +1,526 @@ +{ + "Uuid": "45732322-5b7c-4527-a7ff-2181708d3c04", + "IsCustomNode": false, + "Description": null, + "Name": "TestFormattedStringFromArrayPreview_numericformat", + "ElementResolver": { + "ResolutionMap": {} + }, + "Inputs": [], + "Outputs": [], + "Nodes": [ + { + "ConcreteType": "CoreNodeModels.FromArray, CoreNodeModels", + "Id": "c27d9e0545f74aac8f53a9e485e0f9c0", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "cc0b8d6aed9043de91272235e6ab2e50", + "Name": "arr", + "Description": "The array of object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "5144a5cf722c4b3da19b0708be143915", + "Name": "str", + "Description": "String representation of the array", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an array to a string representation" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "Id": "012e48cbf12d4277a4ee77c990ec7a68", + "NodeType": "CodeBlockNode", + "Inputs": [], + "Outputs": [ + { + "Id": "480593de671c4fd0a5aba280e2065a8b", + "Name": "", + "Description": "Value of expression at line 1", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly", + "Code": "1..3..#4;" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 298.0, + "WatchHeight": 38.0, + "Id": "4b6c7485022c4593ad15d280b5e99e8f", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "cc5f61300a9a40b79d66da1579621edc", + "Name": "", + "Description": "Node to evaluate.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "f0db4981f30a468bbb33fb9d80199b95", + "Name": "", + "Description": "Watch contents.", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", + "Id": "b9352a46c1634e65a64bd8062e2a6102", + "NodeType": "CodeBlockNode", + "Inputs": [], + "Outputs": [ + { + "Id": "9eebab252bf0454c826a3fb48016ec02", + "Name": "", + "Description": "Value of expression at line 1", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Allows for DesignScript code to be authored directly", + "Code": "[\"F1\",\"G\",\"B\"];" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromArray, CoreNodeModels", + "Id": "74f97ab047fa49eaaa8d77271ecb87e0", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "39204eddb5214b8784ef4d0a66415a2e", + "Name": "array", + "Description": "The array of object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "a93226abb9014f848ced0e08e546b696", + "Name": "useNumericFormat", + "Description": "should the numeric precision format be used when converting doubles (disabled)", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "9bb562665ed04284adf767976c17b2d2", + "Name": "string", + "Description": "String representation of the array", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an array to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 80.0, + "WatchHeight": 38.0, + "Id": "c198ae603bba4cc0a7ef17c3444f8156", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "b389674f395a4746b32d7583d975e743", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "929d7e76504340349292c5c432724364", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 298.0, + "WatchHeight": 38.0, + "Id": "a28fa354113640eab04af51930aaeca2", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "44b3628a3c864218b68753a9552537b3", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "f1307dd499c7413587db852a6a66fa42", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels", + "WatchWidth": 419.0, + "WatchHeight": 136.0, + "Id": "f690cbe74f4c45e7917e742af16219ad", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "0a76d7cfd50044868dc5996ae88c325f", + "Name": "", + "Description": "Node to show output from", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "05280f24000e45ada5b1e986d72423e4", + "Name": "", + "Description": "Node output", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Visualizes a node's output" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromArray, CoreNodeModels", + "Id": "96271f95253f4524a95db2d7400c4f52", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "67584c6e3687412ca4c3fca661a85911", + "Name": "array", + "Description": "The array of object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "56f6b5874d3d4474b9efc9266735b5e4", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "2b5df70c7ac34313813f29f47326e817", + "Name": "string", + "Description": "String representation of the array", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an array to a string representation" + }, + { + "ConcreteType": "CoreNodeModels.FormattedStringFromArray, CoreNodeModels", + "Id": "24cdee3feeb04e09bcad4b0078581347", + "NodeType": "ExtensionNode", + "Inputs": [ + { + "Id": "1823631337ab41a58bc0b24670d65ae2", + "Name": "array", + "Description": "The array of object to be serialized", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + }, + { + "Id": "ea6ed5138ef74182b621508230aaf896", + "Name": "formatSpecifier", + "Description": "format specifier for numeric values", + "UsingDefaultValue": true, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Outputs": [ + { + "Id": "2fac04be2c194c2cabf862a710cda54a", + "Name": "string", + "Description": "String representation of the array", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "Replication": "Disabled", + "Description": "Converts an array to a string representation" + } + ], + "Connectors": [ + { + "Start": "5144a5cf722c4b3da19b0708be143915", + "End": "cc5f61300a9a40b79d66da1579621edc", + "Id": "0c116fd047bc42d4a799794b440ed7f5", + "IsHidden": "False" + }, + { + "Start": "480593de671c4fd0a5aba280e2065a8b", + "End": "cc0b8d6aed9043de91272235e6ab2e50", + "Id": "e1f6a2d64a1547dfb384016d5be86549", + "IsHidden": "False" + }, + { + "Start": "480593de671c4fd0a5aba280e2065a8b", + "End": "39204eddb5214b8784ef4d0a66415a2e", + "Id": "6d4611a0e5914a12be3763132720005c", + "IsHidden": "False" + }, + { + "Start": "480593de671c4fd0a5aba280e2065a8b", + "End": "67584c6e3687412ca4c3fca661a85911", + "Id": "4a27e6486b994d3a83828b2339bbfd80", + "IsHidden": "False" + }, + { + "Start": "480593de671c4fd0a5aba280e2065a8b", + "End": "1823631337ab41a58bc0b24670d65ae2", + "Id": "58753234ed1f47d49702260243e689c9", + "IsHidden": "False" + }, + { + "Start": "9eebab252bf0454c826a3fb48016ec02", + "End": "ea6ed5138ef74182b621508230aaf896", + "Id": "938d461eafdd4ef9806ee339969e12f6", + "IsHidden": "False" + }, + { + "Start": "9bb562665ed04284adf767976c17b2d2", + "End": "b389674f395a4746b32d7583d975e743", + "Id": "319e84e8bc714198802388fda8aebca2", + "IsHidden": "False" + }, + { + "Start": "2b5df70c7ac34313813f29f47326e817", + "End": "44b3628a3c864218b68753a9552537b3", + "Id": "2dd8f3f0b65a43f8b2ac4836724943a1", + "IsHidden": "False" + }, + { + "Start": "2fac04be2c194c2cabf862a710cda54a", + "End": "0a76d7cfd50044868dc5996ae88c325f", + "Id": "2ff00e8d99de423195bc927856b1d761", + "IsHidden": "False" + } + ], + "Dependencies": [], + "NodeLibraryDependencies": [], + "EnableLegacyPolyCurveBehavior": true, + "Thumbnail": "", + "GraphDocumentationURL": null, + "ExtensionWorkspaceData": [ + { + "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670", + "Name": "Properties", + "Version": "3.0", + "Data": {} + } + ], + "Author": "None provided", + "Linting": { + "activeLinter": "None", + "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a", + "warningCount": 0, + "errorCount": 0 + }, + "Bindings": [], + "View": { + "Dynamo": { + "ScaleFactor": 1.0, + "HasRunWithoutCrash": true, + "IsVisibleInDynamoLibrary": true, + "Version": "3.4.0.6676", + "RunType": "Automatic", + "RunPeriod": "1000" + }, + "Camera": { + "Name": "_Background Preview", + "EyeX": -17.0, + "EyeY": 24.0, + "EyeZ": 50.0, + "LookX": 12.0, + "LookY": -13.0, + "LookZ": -58.0, + "UpX": 0.0, + "UpY": 1.0, + "UpZ": 0.0 + }, + "ConnectorPins": [], + "NodeViews": [ + { + "Id": "c27d9e0545f74aac8f53a9e485e0f9c0", + "Name": "String from Array", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 329.83615590858915, + "Y": 264.44863102728914 + }, + { + "Id": "012e48cbf12d4277a4ee77c990ec7a68", + "Name": "Code Block", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -3.2945482059884625, + "Y": 259.7251911171454 + }, + { + "Id": "4b6c7485022c4593ad15d280b5e99e8f", + "Name": "watch1", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 592.9054158830944, + "Y": 268.0759595281854 + }, + { + "Id": "b9352a46c1634e65a64bd8062e2a6102", + "Name": "Code Block", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": -129.38907825891982, + "Y": 682.3632653107057 + }, + { + "Id": "74f97ab047fa49eaaa8d77271ecb87e0", + "Name": "String from Array2", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 327.4697339717835, + "Y": 881.6712841125085 + }, + { + "Id": "c198ae603bba4cc0a7ef17c3444f8156", + "Name": "watch4", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 611.7258533738277, + "Y": 902.9404607916114 + }, + { + "Id": "a28fa354113640eab04af51930aaeca2", + "Name": "Watch2", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 620.7629312816283, + "Y": 407.74862501298634 + }, + { + "Id": "f690cbe74f4c45e7917e742af16219ad", + "Name": "Watch3", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 692.0084730824933, + "Y": 652.511871701363 + }, + { + "Id": "96271f95253f4524a95db2d7400c4f52", + "Name": "String from Array And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 260.57759376051, + "Y": 410.86538545620147 + }, + { + "Id": "24cdee3feeb04e09bcad4b0078581347", + "Name": "String from Array And Format", + "IsSetAsInput": false, + "IsSetAsOutput": false, + "Excluded": false, + "ShowGeometry": true, + "X": 305.38333347175626, + "Y": 656.9108064199578 + } + ], + "Annotations": [], + "X": 5.4580877421955165, + "Y": -256.1436648704163, + "Zoom": 0.6181807073903587 + } +} \ No newline at end of file