Skip to content

Commit

Permalink
Fix CreateCustom to only create custom objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Wakeman authored and adecler committed Nov 27, 2019
1 parent 697b71d commit c3f2b87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Excel_UI/UI/Callers/CreateCustom.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using BH.oM.Base;
using BH.Engine.Reflection;
using BH.oM.Base;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -33,7 +34,7 @@ public override object Run(object[] inputs)
if (props.Count == values.Count)
{
for (int i = 0; i < props.Count; i++)
obj.CustomData[InputParams[i].Name] = inputs[i];
obj.SetPropertyValue(props[i], values[i]);
}

return obj;
Expand Down
3 changes: 2 additions & 1 deletion Excel_UI/UI/Components/oM/CreateCustom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

namespace BH.UI.Excel.Components
{
public class CreateCustomFormula : CallerFormula
public class CreateCustomFormula : SingleOptionCallerFormula
{
/*******************************************/
/**** Properties ****/
Expand All @@ -42,6 +42,7 @@ public class CreateCustomFormula : CallerFormula

public override string MenuRoot { get; } = "Create Custom";

public override string Name { get; } = "Create.CustomObject";
public override string Function => Name;

/*******************************************/
Expand Down

0 comments on commit c3f2b87

Please sign in to comment.