-
大小: 298KB文件類型: .rar金幣: 2下載: 1 次發(fā)布日期: 2021-06-16
- 語(yǔ)言: C#
- 標(biāo)簽: Catia??二次開(kāi)發(fā)??C#??
資源簡(jiǎn)介
使用C#實(shí)現(xiàn)《CATIA二次開(kāi)發(fā)技術(shù)基礎(chǔ)》中模板,便于Catia二次開(kāi)發(fā)時(shí)初始化。采用VS2015編寫(xiě),代碼里面錯(cuò)誤控制需進(jìn)一步進(jìn)行改進(jìn)。

代碼片段和文件信息
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);
????????}
????????//打開(kāi)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未打開(kāi)“);
????????????}
????????????
????????}
????????//打開(kāi)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未打開(kāi)“);
????????????}
????????????
????????}
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????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個(gè)文件信息
評(píng)論
共有 條評(píng)論