CATIA.SystemService.ExecuteScript problem
CATIA.SystemService.ExecuteScript problem
(OP)
Hello All
I'm trying to use below code to run CATVBS code from VBA. It throws an error that "Function or interface marked as restricted or function uses an automation type is not supported in VB"
☺- catScriptLibraryTypeDirectory is correct for catvbs????? or
do i need some settings to be changed.
regards
I'm trying to use below code to run CATVBS code from VBA. It throws an error that "Function or interface marked as restricted or function uses an automation type is not supported in VB"
CODE --> VB
Sub CATMain() Dim EmptyPar() Dim ScPath Path = "C:\tmp" CATIA.SystemService.ExecuteScript Path, catScriptLibraryTypeDirectory, "macro1.catvbs", "CATMain", EmptyPar End Sub
☺- catScriptLibraryTypeDirectory is correct for catvbs????? or
do i need some settings to be changed.
regards





RE: CATIA.SystemService.ExecuteScript problem
(my CAD workstation is in different network from my mailing system. so can not copy paste my codes exactly. i have to retype all the code to post a thread in forum.
RE: CATIA.SystemService.ExecuteScript problem
CODE --> VB
Call vSystemService.ExecuteScript("C:\Temp", catScriptLibraryTypeDirectory, "SetPartNumber.CATScript", "CATMain", params)RE: CATIA.SystemService.ExecuteScript problem
So, problem was in fact in catvbs, you used As statement....by changing extension with CATScript problem was solved, isn't it?
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: CATIA.SystemService.ExecuteScript problem
Iam still executing catvbs.
1) I did early binding on CATIA.SystemService then used "Call".
2) params empty ie. Dim Params ()
3) catScriptLibraryTypeDirectory is correct for catvbs and CATscript
Problem solved
regards
var
RE: CATIA.SystemService.ExecuteScript problem
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: CATIA.SystemService.ExecuteScript problem
you are right. problem was with script line that calling catvbs..