mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-09-16 17:45:48 +00:00
integrate Revit 2025 SDK
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Analysis;
|
||||
using Autodesk.Revit.DB.ExtensibleStorage;
|
||||
|
||||
namespace Revit.SDK.Samples.NetworkPressureLossReport
|
||||
{
|
||||
internal class SegmentInfo
|
||||
internal class SegmentInfo : IDisposable
|
||||
{
|
||||
private MEPNetworkSegmentId m_id;
|
||||
private MEPAnalyticalSegmentType m_segmentType;
|
||||
@@ -21,6 +22,7 @@ namespace Revit.SDK.Samples.NetworkPressureLossReport
|
||||
private XYZ m_startPt;
|
||||
private XYZ m_endPt;
|
||||
const double Tolerance = 0.0000001;
|
||||
private bool isDisposed;
|
||||
|
||||
public double Flow
|
||||
{
|
||||
@@ -114,6 +116,23 @@ namespace Revit.SDK.Samples.NetworkPressureLossReport
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposing || isDisposed)
|
||||
return;
|
||||
|
||||
(m_id as IDisposable)?.Dispose();
|
||||
|
||||
isDisposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal class CompareNetworkSegmentId : IEqualityComparer<MEPNetworkSegmentId>
|
||||
|
||||
Reference in New Issue
Block a user