• 大小: 3.57MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-12
  • 语言: 其他
  • 标签: 二次开发  api  pdm  

资源简介

这是solidworks PDM二次开发参考,注意这是自己整理的,依据chm文档整理,辛苦费还是必须的,希望对你有用。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using EPDM.Interop.epdm;
using Microsoft.VisualBasic;

namespace AccessCustRefs_CSharp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private IEdmVault5 vault1 = null;
        IEdmEnumeratorCustomReference6 addCustRefs;
        IEdmFile5 file1 = null;
        IEdmFile5 file2 = null;

        IEdmFolder5 parentFolder = null;

        public void Form1_Load(System.object sender System.EventArgs e)
        {
            try
            {
                IEdmVault5 vault1 = new EdmVault5();
                IEdmVault8 vault = (IEdmVault8)vault1;
                EdmViewInfo[] Views = null;

                vault.GetVaultViews(out Views false);
                VaultsComboBox.Items.Clear();
                foreach (EdmViewInfo View in Views)
                {
                    VaultsComboBox.Items.Add(View.mbsVaultName);
                }
                if (VaultsComboBox.Items.Count > 0)
                {
                    VaultsComboBox.Text = (string)VaultsComboBox.Items[0];
                }
            }
            catch (System.Runtime.InteropServices.COMException ex)
            {
                MessageBox.Show(“HRESULT = 0x“ + ex.ErrorCode.ToString(“X“) + “ “ + ex.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        public void BrowseButton_Click(System.object sender System.EventArgs e)
        {
            try
            {
                CustRefListBox.Items.Clear();

                if (vault1 == null)
                {
                    vault1 = new EdmVault5();
                }
                if (!vault1.IsLoggedIn)
                {
                    //Log into selected vault as the current user
                    vault1.LoginAuto(VaultsComboBox.Text this.Handle.ToInt32());
                }

                //Set the initial directory in the Open dialog
                CustRefOpenFileDialog.InitialDirectory = vault1.RootFolderPath;
                //Show the Open dialog
                System.Windows.Forms.DialogResult DialogResult;
                DialogResult = CustRefOpenFileDialog.ShowDialog();
                //If the user didn‘t click Open exit
                if (!(DialogResult == System.Windows.Forms.DialogResult.OK))
                {
                    return;
                }

                foreach (string FileName in CustRefOpenFileDialog.FileNames)
                {
                    CustRefListBox.Items.Add(FileName);
                }
            }
            catch (System.Runtime.InteropServices.COMException ex)
            {
                MessageBo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      18944  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\bin\Debug\PaintWorkflowGraph_CSharp.exe

     文件      26112  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\bin\Debug\PaintWorkflowGraph_CSharp.pdb

     文件      11600  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\bin\Debug\PaintWorkflowGraph_CSharp.vshost.exe

     文件        490  2010-03-17 22:39  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\bin\Debug\PaintWorkflowGraph_CSharp.vshost.exe.manifest

     文件       8250  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Form1.cs

     文件       5310  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Form1.Designer.cs

     文件       6536  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        681  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\obj\x86\Debug\PaintWorkflowGraph_CSharp.csproj.FileListAbsolute.txt

     文件        917  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\obj\x86\Debug\PaintWorkflowGraph_CSharp.csproj.GenerateResource.Cache

     文件      18944  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\obj\x86\Debug\PaintWorkflowGraph_CSharp.exe

     文件      26112  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\obj\x86\Debug\PaintWorkflowGraph_CSharp.pdb

     文件        180  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\obj\x86\Debug\PaintWorkflowGraph_CSharp.Properties.Resources.resources

     文件       3813  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp.csproj

     文件        506  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Program.cs

     文件       1382  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Properties\AssemblyInfo.cs

     文件       2902  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Properties\Resources.Designer.cs

     文件       5612  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Properties\Resources.resx

     文件       1112  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Properties\Settings.Designer.cs

     文件        249  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp\Properties\Settings.settings

     文件        917  2018-11-01 23:01  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp.sln

    ..A..H.     32256  2018-11-01 23:02  PaintWorkflowGraph_CSharp\PaintWorkflowGraph_CSharp.suo

     文件      18944  2018-11-01 22:52  RawReferencesCSharp\RawReferencesCSharp\bin\Debug\RawReferencesCSharp.exe

     文件      26112  2018-11-01 22:52  RawReferencesCSharp\RawReferencesCSharp\bin\Debug\RawReferencesCSharp.pdb

     文件      11600  2018-11-01 22:51  RawReferencesCSharp\RawReferencesCSharp\bin\Debug\RawReferencesCSharp.vshost.exe

     文件        490  2010-03-17 22:39  RawReferencesCSharp\RawReferencesCSharp\bin\Debug\RawReferencesCSharp.vshost.exe.manifest

     文件       8484  2018-11-01 22:51  RawReferencesCSharp\RawReferencesCSharp\Form1.cs

     文件       6254  2018-11-01 22:52  RawReferencesCSharp\RawReferencesCSharp\Form1.Designer.cs

     文件       6500  2018-11-01 22:52  RawReferencesCSharp\RawReferencesCSharp\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        573  2018-11-01 22:52  RawReferencesCSharp\RawReferencesCSharp\obj\x86\Debug\RawReferencesCSharp.csproj.FileListAbsolute.txt

     文件        917  2018-11-01 22:52  RawReferencesCSharp\RawReferencesCSharp\obj\x86\Debug\RawReferencesCSharp.csproj.GenerateResource.Cache

............此处省略1647个文件信息

评论

共有 条评论