c# /microstation /Element ID 點擊物件出現介面

請問

怎麼在MicroStation的圖檔,點擊圖上的物件並出現C#寫的介面

我們已經有給點擊的指令,但並沒有綁定物件的ID

我們不知道該如何綁定物件ID,請提供我們幫助

protected override int Run(string[] commandLine)

        {

            m_ActiveModel = BM.Session.Instance.GetActiveDgnModel();

            m_ActiveDgnFile = BM.Session.Instance.GetActiveDgnFile();

            SelectionChangedEvent += getID;

             return 0;

        }

        public void getID(BM.AddIn sender, BM.AddIn.SelectionChangedEventArgs selectArgs)

        {

            Bentley.DgnPlatformNET.ElementAgenda C = new DPN.ElementAgenda();

            Bentley.DgnPlatformNET.SelectionSetManager.BuildAgenda(ref C);

            if (C.GetCount() == 1)

            {

              

                DPN.ElementId id = C.GetFirst().ElementId;

                NewForm theForm = new NewForm();

               theForm.Show();

            }

        }