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!

script encoding 1

Status
Not open for further replies.

JeniaL

Mechanical
Jun 3, 2014
547
IL
hi guys,
i know i'm not the first person who is asking that question.
how can i turn VBA to EXE and exe to VBA? google seems to be not so helpful. i've found that you can get exe with visual studio 6.
i have visual studio 2015 and cant find a way how to open catvba in there.any help on this will be appreciated.

also how can i decode catvbs?
download.aspx

the source of this macro is easy recognizable for the most on this board.
what sortware used to create a form/exe?
 
Replies continue below

Recommended for you

from catia vba -> export your module, class and form.... this will give you text files (.BAS)
from that you could copy/paste into a project in VB

Eric N.
indocti discant et ament meminisse periti
 
thanks. but how do i get exe file? when i paste code from catia it comes with a lot of errors in visual studio.
with native vb it seems to be pretty easy to build exe.
 
Hi
I understand that you want to protect your code, what is bellow is also written in CATIA Portable Script Center
[ul]
VBA Executable Password Protect Code
[li] Keep your code in VBA and password protect the project. Not perfect (can still be hacked) but it will stop most people from viewing the code. Also you can define security on the file system folder where the CATVBA file is (make it read only for users)[/li]
[li] If you have Visual Studio 6, you can compile a dll file, then reference it in your VBA project. This way, no one can see or modify your source code and the program runs in the CATIA process.[/li]
[li] If you have Visual Studio 6, you can bring your code in from VBA as is and compile it into an exe. However, when this runs it will be outside the CATIA process, so it will be like another app running in windows instead of inside the CATIA process. But again the code is safe from viewing or modification.[/li]
[/ul]

Regards
Fernando

- Romania
- EU
 
finally got how to that in vb6.

a code must be changed a little bit.
Sub Main() instead of Sub CatMain() and you have to get catia at the beginning

On Error Resume Next
Set MyCATIA = GetObject(, "CATIA.Application")
If Err.Number <> 0 Then
Set MyCATIA = CreateObject("CATIA.Application")
MyCATIA.Visible = False
End If
On Error GoTo 0
see attached file.
 
 http://files.engineering.com/getfile.aspx?folder=e2ca1ac9-645f-4183-a517-28681372e7a6&file=Jenia.zip
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top