C# Solidworks二次开发------综合小设计-1
创始人
2024-11-15 04:33:56
0

一、内容

本文对前面所提及的相关信息做一些小设计

二、代码

public void Open_File(string FileNmae) {     Process.Start("explorer.exe", FileNmae); }  public void Connect_Excel() {     string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="路                 OleDbConnection connection = new OleDbConnection(connectionString);     connection.Open();     string sql = "Select * from [110KV-下节油箱三维模型设计$]";     OleDbDataAdapter adapter = new OleDbDataAdapter(sql, connection);     DataSet dataset = new DataSet();     adapter.Fill(dataset);     connection.Close();     DataTableCollection tableCollection = dataset.Tables;     DataTable table = tableCollection[0];     DataRowCollection rowCollection = table.Rows;     foreach (DataRow row in rowCollection)             {                 for (int i = 0; i < 8; i++)                 {                     name1[w] = Convert.ToString(row[0]);                     name2[w] = Convert.ToString(row[1]);                     name3[w] = Convert.ToString(row[2]);                     name4[w] = Convert.ToString(row[3]);                  }                 w++;                 count++;             }         }//连接EXCEL  public void Move_Part(string sourceFolderPath) //转移         {             string destinationFolderPath = "路径";             string searchPattern = "*.*";              // 获取源文件夹中所有匹配搜索模式的文件列表               string[] filess = Directory.GetFiles(sourceFolderPath, searchPattern);              foreach (string file in filess)             {                 string fileName = Path.GetFileName(file);                 string destinationFile = Path.Combine(destinationFolderPath, fileName);                 File.Copy(file, destinationFile, true); // 第三个参数为true时表示可以覆盖同名文件               }         } 

这三个一起是,打开我们设定的模型,读取EXCEL表中内容,将模型转移

相关内容

热门资讯

科普!wopoker系统套路,... 【福星临门,好运相随】;科普!wopoker系统套路,太坑了从前存在有挂(2020已更新)(哔哩哔哩...
4分钟了解!麻雀智能辅助软件开... 4分钟了解!麻雀智能辅助软件开挂插件开挂,雀神广东麻将提高胜率软件透视挂(最新版本2026)1、首先...
黑科技辅助(QQpoker)外... 黑科技辅助(QQpoker)外挂透明挂辅助助手(透视)2025新版技巧(2026已更新)(哔哩哔哩)...
第4分钟辅助!小程序广东雀神智... 第4分钟辅助!小程序广东雀神智能插件安装下载,新星游辅助软件免费版(正版透视开挂辅助技巧)1、游戏颠...
黑科技辅助(德扑之星代打)外挂... 黑科技辅助(德扑之星代打)外挂软件透明挂智能ai代打辅助插件(透视)揭秘攻略(2022已更新)(哔哩...
黑科技数据!wepoke辅助真... 黑科技数据!wepoke辅助真的假的,太坑了原先是有挂(2024已更新)(哔哩哔哩);详细wepok...
第四分钟了解!奇迹陕西辅助器插... 第四分钟了解!奇迹陕西辅助器插件开挂,中至江西插件软件透视挂(最新版本2026)1、上手简单,内置详...
黑科技辅助(pokermast... 您好,这款游戏可以开挂的,确实是有挂的,需要了解加微【136704302】很多玩家在这款游戏中打牌都...
7分钟辅助!福建天天开心辅助工... 7分钟辅助!福建天天开心辅助工具,九酷众娱辅助(正版透视开挂辅助插件)一、福建天天开心辅助工具AI软...
黑科技辅助(Wepoke安卓版... 黑科技辅助(Wepoke安卓版本)外挂软件透明挂智能ai辅助软件(透视)曝光教程(2020已更新)(...