Password Protect for Project.ipj

Password Protect for Project.ipj

Anonymous
Not applicable
1,248 Views
15 Replies
Message 1 of 16

Password Protect for Project.ipj

Anonymous
Not applicable

Hello -

 

I am trying to apply a password for IPJ (project) files. So, when a user tries to activate the IPJ (Project) they will be prompted a password before they can access.

 

I have already learned how to apply a password to a inventor file...  See below, I am thinking this is an external rule (ilogic/API)?

 

Capture.JPG

0 Likes
1,249 Views
15 Replies
Replies (15)
Message 2 of 16

Jef_E
Collaborator
Collaborator

You can create a Addin or macro? to monitor the OnActiveProjectChanged event

 

 

ApplicationEvents.OnActiveProjectChanged Event

Parent Object: ApplicationEvents

 

Description

Fires just before and soon after the active project is changed, supplying the context in which this action is being taken.

 

Syntax

ApplicationEvents.OnActiveProjectChanged( ProjectObject As DesignProject, BeforeOrAfter As EventTimingEnum, Context As NameValueMap, HandlingCode As HandlingCodeEnum )

 

Parameters

Name Description
ProjectObject The object that has been activated.
BeforeOrAfter Input indicating if the event is being fired before (kBefore) or after (kAfter) the document is activated. Notification is sent before and after the active project is changed.
Context Input object that can be used to determine the context of why the event fired. This event provides additional information through the Context argument as described below: Name = "FileName". Value = Full filename of the ipj file that is being activated. Name = "Reason". Value = The reason the notification was made. Can be one of the following values: "ProjectActivated" or "ProjectSaved".
HandlingCode Output that indicates how you are handling the event. This argument is ignored for this event.

 

Remarks

The OnActiveProjectChanged event notifies a client when a change has been made to the active project. The notification is sent for two different actions that are related to projects; a new project is activated and the active project is saved. This event provides the DesignProject object as a representative of the project. At this time, the DesignProject object is limited in the functionality it provides. In cases where you need more information about the project you may want to use the FileLocations object.

 

Version

Introduced in Inventor version 7



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 3 of 16

Anonymous
Not applicable

Hello,

 

The easy way:

As you will probably be using the Autodesk Vault, then just have the project.ipj checked out by administrator.

 

Cheers

0 Likes
Message 4 of 16

Jef_E
Collaborator
Collaborator

And how is this relevant to the question? The OP wants to have a password when another project is activated, not being edited...

 

Plus vault will still alow edits to the file locally, just not sent back to the server..



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 5 of 16

Anonymous
Not applicable

Hello Jeff,

 

Can the user be forced to load the addin then?

 

Best Regards

0 Likes
Message 6 of 16

Anonymous
Not applicable
Thanks Jef_E for your efforts. I have just started to learn VB.net, I
downloaded Visual basic 10 express. I will plug your program (syntax) as a
addin and see if this work. I will post my results and/or further questions.
0 Likes
Message 7 of 16

Anonymous
Not applicable

Thanks for your reply Jef_E

 

Would you please write the syntax code for the API... I am learning VB.net as we speak. If you write the code, I could plug it in VB.net and apply it. I also can edit changes to it if need be...

 

Brian

0 Likes
Message 8 of 16

Aadithya01
Advisor
Advisor

Hi @Anonymous

 

I am Authorized Reseller here at India and my customer just had asked for password protection . Were you able to develop the add-in for password protection ? 

 

Looking forward for your reply

 

0 Likes
Message 9 of 16

Jef_E
Collaborator
Collaborator

Yes I did, but it is not freeware..



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 10 of 16

Aadithya01
Advisor
Advisor

How much does it cost ? 

0 Likes
Message 11 of 16

Jef_E
Collaborator
Collaborator

I would need to ask my boss,

 

I made this ADDIN for my company, and they are the owner, I am not allowed to sell it. But chances are that it is not for sale;

 

Maybe write it yourself? If you need guidance, this I can provide.



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 12 of 16

Aadithya01
Advisor
Advisor

Hi @Jef_E

 

I just used the iLogic code like mentioned by @Anonymous .... It has worked fine for me .. I just wanted to know if you have made any further improvisations in the password protect feature ... Anything like Forgot password feature or something like that ? 

0 Likes
Message 13 of 16

Jef_E
Collaborator
Collaborator

If you would like to have a forgot password feature, you would need to parse the entered password with a database value. If it's incorrect the password must be changed in the database. This is alot more complex than you might think.

 

If you are looking to use passwords as you know them ( email login etc. ) I must recommend the use of a database server.

 

BUT.. you can do it more easy. 

 

1) Did you hardcoded the password in iLogic? Or did you store it somewhere hidden as value?

 

--> Use a value stored somewhere. This can be attributes or a hidden iProperty set. To hack the password someone would need to look into these places to find it. Also you would be able to change it.

 

I would recommend the attributes and serialize the password to byte() harder to encrypt.

 

If you share your code I could alter a little so you can have a "safe" & "recover able" password. But please don't compare it with a real password system that can't be hacked.



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 14 of 16

Frederick_Law
Mentor
Mentor

What prevent user from disabling the addin/ilogic?  Hence removing password protection?

0 Likes
Message 15 of 16

Jef_E
Collaborator
Collaborator

You could, trigger the iLogic rule in document on open document. Give password or close document.

 

 

ADDIN would not work, because you need the ADDIN to protect the files, use another computer and the files will be free.

 

Edit: But correct you could still disable iLogic and the protection is gone.



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 16 of 16

Skadborg.NTI
Advocate
Advocate
I don't see that this can be solved with iLogic:
You can only change ipj when no files are open in Inventor.
AND
You can only run iLogic in an open Inventor document. iLogic doesn't exist outside a document.
0 Likes