Exemple #1
0
        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            List <string> AttList = new List <string>();
            CADtoShape    con     = new CADtoShape("D:\\Data\\工图CAD.dwg");

            TypeTag = "Annotation";
            if (radioButton4.Checked == true)
            {
                checkedListBox1.Items.Clear();
                AttList = con.getUniqueAttByFeaType("4");
                for (int i = 0; i < AttList.Count; i++)
                {
                    checkedListBox1.Items.Add(AttList[i]);
                }
            }
        }
Exemple #2
0
        private void btnOutput_Click(object sender, EventArgs e)
        {
            List <string> fileList = new List <string>();

            try
            {
                CADtoShape pCADtoShp = new CADtoShape("D:\\Data\\工图CAD.dwg", tbxPath.Text, TypeTag);
                for (int i = 0; i < checkedListBox1.CheckedItems.Count; i++)
                {
                    fileList.Add(checkedListBox1.CheckedItems[i].ToString());
                }
                pCADtoShp.CADLayerToFeatureClass(fileList);
                MessageBox.Show("创建成功!");
            }
            catch (Exception)
            {
                return;
            }
            tbxPath.Enabled = true;
        }