SolidWorks EPDM Secondary Development

Source: Internet
Author: User

When I first published a blog post, we thought it was wrong or bad. Please make more bricks.

 

After reading the secondary development document, the general feeling is that EPDM provides many interfaces. If you want to do a good job of development in this area, you can read the API documentation provided by EPDM.

For secondary development of EPDM, you must first have an environment, vs2005 or vs2008 SQLServer2005 or above.

Let's get down to the point. First, we will introduce the entrance to the secondary development of EPDM.

The secondary development entrance provided by EPDM is the interface of IEDMVault5-IEDMVault11. Before program development, you must declare the objects of the classes provided above.

The following is a small example of reading the customer's name to see how the program connects EPDM.

Create a project first.

Then add the tlb file Library. Generally, after all the environments are installed, the PDMWorks Enterprise 2010 Type Library will be selected in the COM column when adding references, if not, go to the PDM installer and find Support \ API \ Edm. tlb

Drag a button to the Form, and then drag a listbox to the Form. Double-Click button. VS automatically adds a Click event.

The specific implementation code is as follows:

Imports EdmLib 'contains the EdmLib header file Public Class TestUserList Dim vault As IEdmVault7 Private Sub TestUserList_Load (ByVal sender As System. object, ByVal e As System. eventArgs) Handles MyBase. load vault = New EdmVault5 'create Edmvault5 object End Sub Private Sub btn_GetUsers_Click (ByVal sender As System. object, ByVal e As System. eventArgs) Handles btn_GetUsers.Click If Not vault. isLoggedIn then' if you have not logged on to PDM, log on to the vault. loginAuto ("Trainning", Me. handle. toInt32) End If ListBox1.Items. clear () Dim userMgr As IEdmUserMgr6 'declare an IEdmUserMgr variable userMgr = vault' to directly assign the vault value to userMgr Dim pos As iedmpos5' to define an IEdmPos5 variable (this variable is often used) pos = userMgr. getFirstUserPosition () 'gets the first user While Not pos. isNull Dim user As IEdmUser5 user = userMgr. getNextUser (pos) 'cyclically reads the user ListBox1.Items. add (user. name) End While End SubEnd Class

 

The running result is as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.