How to protect but use an ivb file ?

TONELLAL
Collaborator
Collaborator

How to protect but use an ivb file ?

TONELLAL
Collaborator
Collaborator

Hello,

I've created several VBA macro, each one in a separate ivb file. In the default macro file, I have several macro launching the corresponding ivb.

Now, I'd want to protect these macros. So I put a password in each ivb properties ("Lock project for viewing"), but this prevent the macro from being launched by the main ivb.

Is there a way to manage this, knowing I can't do an add-in so I have to stay in vba ?

0 Likes
Reply
660 Views
4 Replies
Replies (4)

WCrihfield
Mentor
Mentor

Is there some reason you can't just use one ivb file (like the main Project ivb, or another, non-document based ivb) , with multiple Modules in it containing all your different codes, instead of several diffrent ivb files?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

YuhanZhang
Autodesk
Autodesk

Can you provide a scenario why you want to protect you VBA code? Would you send your IVB to someone else to run it but you don't want them to see your code?



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes

TONELLAL
Collaborator
Collaborator

@WCrihfield

All macros represent about 20 forms and 35 modules/classes. It is easier to have, concerning the same macro, only the forms, modules and classes concerning only it in the ivb file. Also, you can only save an ivb if you were the first to load it. When working on the common ivb file, I can never save it.

 

@YuhanZhang 

Some macros represent a lot of work, I don't want them to be used everywhere outside our organisation. With teleworking, everyone copy the files locally. I've add a check about organisation before loading, so I don't want the code to be modified too easily.

0 Likes

YuhanZhang
Autodesk
Autodesk

I understand, but currently we don't have a way to hide the VBA code from the debugger who are calling it. You can log this as a wishlist to Idea Station. Or you can just convert your VBA code to a binary file(dll or exe) for your users to run it.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes