×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

script encoding

script encoding

script encoding

(OP)
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?

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

RE: script encoding

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

RE: script encoding

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

RE: script encoding

Hi
I understand that you want to protect your code, what is bellow is also written in CATIA Portable Script Center

    VBA Executable Password Protect Code
  • 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)
  • 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.
  • 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.

Regards
Fernando

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

RE: script encoding

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources