fix: identify failed Ortho pipe placement boundary
This commit is contained in:
@@ -479,15 +479,20 @@ internal sealed class PlantViewportMembershipReader
|
||||
private static bool TryReadPipePlacement(MdObjectId sourceId, DataLinksManager dataLinks, out GeometrySnapshot geometry)
|
||||
{
|
||||
geometry = new GeometrySnapshot();
|
||||
var stage = "GetDatabase";
|
||||
try
|
||||
{
|
||||
var openedByQuery = false;
|
||||
var sourceDatabase = sourceId.GetDatabase(false, ref openedByQuery);
|
||||
try
|
||||
{
|
||||
stage = "StartTransaction";
|
||||
using var transaction = sourceDatabase.TransactionManager.StartOpenCloseTransaction();
|
||||
stage = "MakeAcDbObjectId";
|
||||
var objectId = dataLinks.MakeAcDbObjectId(sourceId.PrjObjectId, sourceDatabase);
|
||||
stage = "OpenPipe";
|
||||
if (transaction.GetObject(objectId, OpenMode.ForRead) is not Pipe pipe) return false;
|
||||
stage = "TransformStartPoint";
|
||||
var point = pipe.StartPoint.TransformBy(sourceId.Xform);
|
||||
geometry = new GeometrySnapshot
|
||||
{
|
||||
@@ -503,7 +508,7 @@ internal sealed class PlantViewportMembershipReader
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
RuntimeDiagnostics.Write("OrthoPipePlacementReadFailed", "ERROR", resultStatus: "ORTHO_PIPE_PLACEMENT_UNAVAILABLE", exception: exception);
|
||||
RuntimeDiagnostics.Write("OrthoPipePlacementReadFailed", "ERROR", resultStatus: "ORTHO_PIPE_PLACEMENT_UNAVAILABLE", exception: exception, details: new Dictionary<string, object?> { ["PlacementStage"] = stage });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user