[V8i C# Addin] FloodFill Method

I'm wanting to obtain area measurements just like the flood MeasureArea command in Microstation. However, I want the user to obtain these measurements through my addin rather than that tool. I want to use the exact same function that MeasureArea --> Flood uses in microstation but I'll be modifying the data obtained for my user and that's why I need the addin.

I've not yet found a C# method for addins for obtaining a measureArea --> flood measurement once the user has clicked a coordinate in the DGN file. Does a method exist?

Parents Reply
  • DanPaul, give an example of how to use this function.
    At me it always returns null.

    using BCOM = Bentley.Interop.MicroStationDGN;
    using BMI = Bentley.MstnPlatformNET.InteropServices;
    
    .......
    
    BCOM.Application app = BMI.Utilities.ComApp;
    DgnModelRef modelRef = Session.Instance.GetActiveDgnModelRef();
    double denominator = modelRef.GetModelInfo().UorPerMaster;
    
    BCOM.Element[] elms = app.ActiveDesignFile.Fence.GetContents().BuildArrayFromContents();
    
    BCOM.Point3d seedPoint = new BCOM.Point3d();
    seedPoint.X = ev.Point.X / denominator;
    seedPoint.Y = ev.Point.Y / denominator;
    seedPoint.Z = ev.Point.Z / denominator;
    
    BCOM.Element result = app.GetFloodBoundary(elms, null, seedPoint, 1, true, 100, BCOM.MsdFillMode.Outlined);

    What does not work?

Children