資源簡介
使用C#實現《CATIA二次開發技術基礎》中模板,便于Catia二次開發時初始化。采用VS2015編寫,代碼里面錯誤控制需進一步進行改進。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
namespace?CatiaDemo_CSharp
{
????public?partial?class?Catia?:?Form
????{
????????public?Catia()
????????{
????????????InitializeComponent();
????????}
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????InitModule?init?=?new?InitModule();
????????????init.InitCATIAProduct(true“test“);
????????????string?test=init.oProductDoc.FullName;
????????????MessageBox.Show(test);
????????}
????????//打開Product
????????private?void?btnOpenProcut_Click(object?sender?EventArgs?e)
????????{
????????????openFileDialog1.Filter?=?“零件文件|*.CATProduct“;
????????????openFileDialog1.ShowDialog();
????????????InitModule?init?=?new?InitModule();
????????????try
????????????{
????????????????init.InitCATIAProduct(false?strProduct:?openFileDialog1.FileName);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????MessageBox.Show(ex.Message+“Product未打開“);
????????????}
????????????
????????}
????????//打開Part
????????private?void?btnOpenPart_Click(object?sender?EventArgs?e)
????????{
????????????openFileDialog1.Filter?=?“零件文件|*.CATPart“;
????????????openFileDialog1.ShowDialog();
????????????InitModule?init?=?new?InitModule();
????????????try
????????????{
????????????????init.InitCATIAPart(false?openFileDialog1.FileName);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????MessageBox.Show(ex.Message?+?“Product未打開“);
????????????}
????????????
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????64512??2018-12-29?17:50??CatiaDemo_CSharp\.vs\CatiaDemo_CSharp\v14\.suo
?????文件????????187??2018-12-28?09:04??CatiaDemo_CSharp\CatiaDemo_CSharp\App.config
?????文件??????15360??2018-12-28?15:45??CatiaDemo_CSharp\CatiaDemo_CSharp\bin\Debug\CatiaDemo_CSharp.exe
?????文件????????187??2018-12-28?09:04??CatiaDemo_CSharp\CatiaDemo_CSharp\bin\Debug\CatiaDemo_CSharp.exe.config
?????文件??????26112??2018-12-28?15:45??CatiaDemo_CSharp\CatiaDemo_CSharp\bin\Debug\CatiaDemo_CSharp.pdb
?????文件??????22696??2018-12-28?15:46??CatiaDemo_CSharp\CatiaDemo_CSharp\bin\Debug\CatiaDemo_CSharp.vshost.exe
?????文件????????187??2018-12-28?09:04??CatiaDemo_CSharp\CatiaDemo_CSharp\bin\Debug\CatiaDemo_CSharp.vshost.exe.config
?????文件????????490??2014-01-14?13:31??CatiaDemo_CSharp\CatiaDemo_CSharp\bin\Debug\CatiaDemo_CSharp.vshost.exe.manifest
?????文件???????1754??2018-12-29?17:50??CatiaDemo_CSharp\CatiaDemo_CSharp\Catia.cs
?????文件???????3712??2018-12-28?15:33??CatiaDemo_CSharp\CatiaDemo_CSharp\Catia.Designer.cs
?????文件???????6020??2018-12-28?15:33??CatiaDemo_CSharp\CatiaDemo_CSharp\Catia.resx
?????文件???????8868??2018-12-28?09:53??CatiaDemo_CSharp\CatiaDemo_CSharp\CatiaDemo_CSharp.csproj
?????文件????????144??2018-12-28?09:13??CatiaDemo_CSharp\CatiaDemo_CSharp\CatiaDemo_CSharp.csproj.user
?????文件??????10016??2018-12-28?16:46??CatiaDemo_CSharp\CatiaDemo_CSharp\InitModule.cs
?????文件????????180??2018-12-28?15:37??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.Catia.resources
?????文件???????2639??2018-12-28?16:43??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.csproj.FileListAbsolute.txt
?????文件???????1012??2018-12-28?15:37??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.csproj.GenerateResource.Cache
?????文件???????2070??2018-12-28?09:12??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.csproj.ResolveComReference.cache
?????文件???????2360??2018-12-28?09:53??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.csprojResolveAssemblyReference.cache
?????文件??????15360??2018-12-28?15:45??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.exe
?????文件??????26112??2018-12-28?15:45??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.pdb
?????文件????????180??2018-12-28?09:53??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\CatiaDemo_CSharp.Properties.Resources.resources
?????文件????????864??2018-12-28?09:04??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????8696??2018-12-28?09:13??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件??????20480??2018-12-28?09:12??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\Interop.CATAssemblyTypeLib.dll
?????文件??????11264??2018-12-28?09:12??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\Interop.CATStrSettingsTypeLib.dll
?????文件??????80896??2018-12-28?09:12??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\Interop.DRAFTINGITF.dll
?????文件??????24064??2018-12-28?09:12??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\Interop.GenKwe.dll
?????文件?????228352??2018-12-28?09:12??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\Interop.HybridShapeTypeLib.dll
?????文件?????167424??2018-12-28?09:09??CatiaDemo_CSharp\CatiaDemo_CSharp\obj\Debug\Interop.INFITF.dll
............此處省略35個文件信息
- 上一篇:文檔管理系統源代碼+數據庫
- 下一篇:ashxC#語言
評論
共有 條評論