Hello,
Has anyone had experience with calling a CatScript from VB.Net? I have several existing CatScripts to perform various functions within CATIA and I would like to use them "as is" if possible and simply call them from my VB.Net form. Below is the code I am trying but, I keep getting a COMException: {"ExecuteScript(C:\temp, Test.CATScript, CATMain) Unknown macro library "C:\temp" "} Not sure where I am going wrong? I even made sure that I had that library loaded in CATIA.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim catScriptLibraryTypeDirectory As CatScriptLibraryType
Dim aParam(0)
aParam(0) = "Nothing"
Dim aScript
aScript = CATIA.SystemService
aScript.ExecuteScript("C:\temp", catScriptLibraryTypeDirectory, "Test.CATScript", "CATMain", aParam)
End Sub
Any help would be appreciated!
C-
Has anyone had experience with calling a CatScript from VB.Net? I have several existing CatScripts to perform various functions within CATIA and I would like to use them "as is" if possible and simply call them from my VB.Net form. Below is the code I am trying but, I keep getting a COMException: {"ExecuteScript(C:\temp, Test.CATScript, CATMain) Unknown macro library "C:\temp" "} Not sure where I am going wrong? I even made sure that I had that library loaded in CATIA.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim catScriptLibraryTypeDirectory As CatScriptLibraryType
Dim aParam(0)
aParam(0) = "Nothing"
Dim aScript
aScript = CATIA.SystemService
aScript.ExecuteScript("C:\temp", catScriptLibraryTypeDirectory, "Test.CATScript", "CATMain", aParam)
End Sub
Any help would be appreciated!
C-
