Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro deployment 1

Status
Not open for further replies.

Gilgamesh99

Automotive
Jun 11, 2013
45
0
0
MX
Hi:

Im trying to deploy some catvba macros (with userforms) with a catalog according to Mike Berry's deployment instructions. By this moment I've tried every workaround possible without success. The best result so far is when the catscript is opened with the catalog, then the attached error appears, click ok, and the macros window opens allowing to select the catvba macro. Is there someone here that can call a catvba macro with a catalog without errors.

The macros and catalog are placed in a server that every user can access. When I open the catalog and call the macro there's no problem, the problem comes when any other user try to do it.

Any help is welcome and appreciated.

 
Replies continue below

Recommended for you

well, the macros are in a server where the users can access any file. What do you mean by "same kind of installation"? if you mean the same catia versio, yes, everyone has V5R18.
 
What Ferdo wanted to know is if all user have access to this location from the E:\ drive.

Looks like something is not define properly in Line 29... Can you share some part of the code?

Eric N.
indocti discant et ament meminisse periti
 
Here is the whole code to invoke a CATVBA with a Catscript:

Code:
Sub CATMain()

 

Dim param()

Dim oFilePath As String
Dim oFileName as String
Dim oModule as String

Dim oSystemService As Variant

Set oSystemService = CATIA.SystemService

 

oFilePath = "E:\USERS\marco12\Catalogo\" 'path where catvba project is stored

oFileName = "Tube_creation_V1.1_AW.catvba" 'name of catvba project

oModule = "Launcher" 'name of the module

 

Dim ss As Variant

Set ss = CATIA.SystemService

ss.ExecuteScript oFilePath & oFileName, catScriptLibraryTypeVBAProject, oModule, "CATMain", param

 

End Sub

Also, I dont know if having all the code in the form has something to do with the error (all the code is within the form instead of in individual modules).

Thanks again for your excellent support!!!
 
Hi sundeep198

I dont know if you're refering to the fact that the deployment doesnt work because Im programming in Windows 7 64 bit and then copying the code in Windows vista is working perfect.
 
Your code to invoke catvba is correct, the problem is how the users has configured their paths to catalog location.

In my case, I saw users which had defined in same way like me the path to a certain location/server and for others in a different way (for example they don't have E drive...).

This depends on how your IT guys did the network connections. I saw also some other cases when they didn't install vba at all...or registration for CATScript and catvbs was done by default to DELMIA and not CATIA...

Regards
Fernando

 
Status
Not open for further replies.
Back
Top