Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA.SystemService.ExecuteScript problem

Status
Not open for further replies.

appvid

Automotive
Nov 9, 2012
81
US
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"


Code:
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
 
Replies continue below

Recommended for you

there is a typo , please read Dim Scpath as Dim Path .. sorry

(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. :) )



 
Guys never mind I solved it.i used this

Code:
Call vSystemService.ExecuteScript("C:\Temp", catScriptLibraryTypeDirectory, "SetPartNumber.CATScript", "CATMain", params)
 
Hello fernando,

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
 

you are right. problem was with script line that calling catvbs..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top