Vb. NET implementation of CATIA two-time development method

Source: Internet
Author: User

originates from the network.

Two development using CATIA under Visual Studio (vb,c#,c++) has the following features:
-You need to reference the object library of CATIA
--Requires object declaration (Visual Studio syntax requirements). When declaring an object, you should indicate that the object type is an object of CATIA, or you might perform an error.
The above two-point procedure is described in detail below.
1. Referencing the CATIA type library
1) Create the project, press the key combination (ALT+F7) or click "Project--Properties"

2) Add a reference to the project: click "References" in the Properties window, then click "Add ..."
.

2011-5-19 15:57 Upload

Download Attachments (105.6 KB)


3) Select "Catia V5 gsminterfaces Object Library" in the "Add Reference" dialog box, "CATIA V5 mecmodinterfaces Object Library", "CATIA V5 Partinterfaces Object Library "," CATIA V5 productstructureinterfaces Object Library "
Note: These references can include basic modules such as part design, GSD module, assembly design, etc., and additional object libraries may be required to operate in other modules. Such as:

2. Import the Object library (in VB, for example) in your code.
1) Add the Imports statement at the front of the code:
Imports Productstructuretypelib
Imports Mecmod
Imports PARTITF
Imports Hybridshapetypelib

2) Defining CATIA Objects
On Error Resume Next
Dim CATIA as INFITF. Application
CATIA = GetObject (, "CATIA. Application ")
If Err.Number <> 0 Then
CATIA = CreateObject ("CATIA. Application ")
Catia. Visible = True
End If
3) The type of CATIA object to use when defining an object:
Like what:
Dim opartdocument as Partdocument = CATIA. ActiveDocument
Dim OpArt as part = Opartdocument.part
Dim ohybridshapefactory as Hybridshapefactory = Opart.hybridshapefactory
Dim hybridShapeLoft1 as Hybridshapeloft = Ohybridshapefactory.addnewloft ()

Vb. NET implementation of CATIA two-time development method

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.