Connect Version 13 C# Programming - ScanCriteria

Hello to All, I am having issues with ScanCriteria scanning and finding elements, I have attached the code below:

Any help would be appreciated.  In vb.net coding I used the Bentley.Interop.MicroStationDGN assembly which is a different scan process. I would like to use the Bentley.DgnPlatformNET assembly in my C# programming.

Thank you, Donna Rodrick

using Bentley.DgnPlatformNET;
using Bentley.DgnPlatformNET.Elements;

namespace SheetManager
{
 public partial class CtSheetManager : Form
 {
    //other code
 

    List<BDPN.Elements.Element> scanEls = new List<BDPN.Elements.Element>();
    scanEls.Capacity = 100;
    using (ScanCriteria scanC = new ScanCriteria())
    {
        List<MSElementType> elementTypes = new List<MSElementType>
        {
            MSElementType.Text
        };
        scanC.AddElementTypes(elementTypes);
        elementTypes.Clear();

        List<DgnElementClass> classTypes = new List<DgnElementClass>
        {
	        DgnElementClass.Construction
        };
        scanC.AddClassTypes(classTypes);
        classTypes.Clear();

        scanEls = scanC.Scan(dgnModel);
    }
    
    //more code

Parents Reply Children