cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How to protect custom functions I have written in code?

CHASEONHO
18-Opal

How to protect custom functions I have written in code?

You can use some of the features of Creo by using the web link.
However, the features we created here are in html format and run in the built-in browser.
In other words, it is shared with html files, and our effort is easily exposed to the outside world.
I think you need some other way to protect some of the features you created with these web links.

 

The first way to think about it is to create a toolkit. But this is a fee, and it seems difficult to learn.
The second way to think about it is to have these web links function as a ribbon with j-link.

The second method seems to be feasible.

 

Here is the question.
1. Can I create a Ribbon that can easily work with creo's specific features (create frequently used parameters) like web links via j-links? Can these generations protect code from the outside world?

 

2. Can I apply the code created with the web link directly as a ribbon? Is this how you can protect your code from the outside world?

 

thanks


best regards

ACCEPTED SOLUTION

Accepted Solutions
sjuraj
15-Moonstone
(To:CHASEONHO)

There are several ways to protect you code:

Creo API offers task based libraries. You can code some functions in another creo api e.g. jlink and then just call this function using weblink.

Option 2 (in my opinion better) is to obfuscate you javascript code. There are severals obfuscators available free. For example http://dean.edwards.name/packer/

You can achieve this (note this is just simple example):

 

js_obfuscation.PNG

 

But remember anyway you try to hide or protect your code, it will be always able to be reverse engineered.

View solution in original post

1 REPLY 1
sjuraj
15-Moonstone
(To:CHASEONHO)

There are several ways to protect you code:

Creo API offers task based libraries. You can code some functions in another creo api e.g. jlink and then just call this function using weblink.

Option 2 (in my opinion better) is to obfuscate you javascript code. There are severals obfuscators available free. For example http://dean.edwards.name/packer/

You can achieve this (note this is just simple example):

 

js_obfuscation.PNG

 

But remember anyway you try to hide or protect your code, it will be always able to be reverse engineered.

Announcements


Top Tags