Catia macro from Excel macro
Catia macro from Excel macro
(OP)
Hello,
I'm programming two macro. One on CATIA and the other on Excel. What I want is that the Excel macro call the CATIA macro but currently I don't how to do that, the only think I'm doing is to open CATIA and my CATPart from Excel.
This is my code in Excel macro :
It's the yellow ligne who give me problem.
If you have any idees thanks.
I'm programming two macro. One on CATIA and the other on Excel. What I want is that the Excel macro call the CATIA macro but currently I don't how to do that, the only think I'm doing is to open CATIA and my CATPart from Excel.
This is my code in Excel macro :
CODE --> VBA
Sub CATIA_liaison()
Dim CATIA As Object
On Error Resume Next
Set CATIA = GetObject(, "CATIA.Application")
If Err.Number <> 0 Then
MsgBox ("Veuillez lancer CATIA.")
End If
On Error GoTo 0
CATIA.Documents.Open (nom_fichier)
CATIA.Visible = True
Call CATIA.Module_Excel.recup_donnee
End Sub If you have any idees thanks.





RE: Catia macro from Excel macro
indocti discant et ament meminisse periti
RE: Catia macro from Excel macro
indocti discant et ament meminisse periti
RE: Catia macro from Excel macro
It's almost what I want to do. My CATIA macro was written in VBA not in VBScript so do you how to deal with that ?
Thanks
RE: Catia macro from Excel macro
Dim strProject, strModule, strSub As String
strProject = "c:\temp\VBAProject1.catvba"
strModule = "Module1"
strSub = "CATMain"
Dim params()
X = CATSS.ExecuteScript(strProject, CatScriptLibraryType.catScriptLibraryTypeVBAProject, strModule, strSub, params)
indocti discant et ament meminisse periti
RE: Catia macro from Excel macro
CODE --> VBA