Skip to content

Commit e7cd4d9

Browse files
rboulton-BHFraser Greenroyd
authored andcommitted
Update depth property description and default value returned by query.depth()
1 parent 6d12b72 commit e7cd4d9

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

XML_Engine/Query/Depth.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ public static partial class Query
4343
/**** Public Methods ****/
4444
/***************************************************/
4545

46-
[Description("Returns the 'depth' property of a markup object as a double. If the value cannot be converted to a double (if the value is null or blank for example) then an error will be provided and -1 will be returned.")]
46+
[Description("Returns the 'depth' property of a markup object as a double. If the value cannot be converted to a double (if the value is null or blank for example) then an error will be provided and 0 will be returned.")]
4747
[Input("markup", "A markup object which contains the 'depth' property.")]
48-
[Output("depth", "The depth value as a double, or -1 if the value could not be converted to a double.")]
48+
[Output("depth", "The depth value as a double, or 0 if the value could not be converted to a double.")]
4949
public static double Depth(this Markup markup)
5050
{
5151
if (markup == null)
52-
return -1;
52+
return 0;
5353

5454
try
5555
{
@@ -58,7 +58,7 @@ public static double Depth(this Markup markup)
5858
catch (Exception e)
5959
{
6060
BH.Engine.Base.Compute.RecordError($"Could not convert XMLDepth value {markup.Depth} to numerical depth.");
61-
return -1;
61+
return 0;
6262
}
6363
}
6464
}

XML_oM/Bluebeam/BluebeamObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace BH.oM.XML.Bluebeam
3434
public class BluebeamObject : IBHoMObject
3535
{
3636
[XmlIgnore]
37-
public virtual Guid BHoM_Guid { get; set; }
37+
public virtual Guid BHoM_Guid { get; set; } = Guid.NewGuid();
3838
[XmlIgnore]
3939
public virtual Dictionary<string, object> CustomData { get; set; }
4040
[XmlIgnore]

XML_oM/Bluebeam/Markup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
using System;
2424
using System.Collections.Generic;
25+
using System.ComponentModel;
2526
using System.Linq;
2627
using System.Text;
2728
using System.Threading.Tasks;
@@ -64,6 +65,7 @@ public class Markup : BluebeamObject
6465
[XmlElement("Label")]
6566
public virtual string Label { get; set; }
6667

68+
[Description("By default this is an XML String representation. Most software will automatically handle the conversion to a numerical representation but users can also use the Query.Depth(Markup) method if necessary.")]
6769
[XmlElement("Depth")]
6870
public virtual string Depth { get; set; }
6971

0 commit comments

Comments
 (0)