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