3dm Password

If I’m not mistaken and from what I read here in the forum, there is no method of blocking a 3dm file by password,

Ok, I need to lock a file, so I thought of a method to do it, (I just need to block a file when using my plugin)

The principle is very basic:

1ºCreate a SetDocumentData “password” with the “password chosen”
2º On “RhinoDoc.EndOpenDocument” check the SetDocumentData “password”
if password match then open document, if not match close document

Although it is a very corny method, it works and does not let open any document that has password.

I make some testes, and the problem is open by the spash screen on rhino startup, it seems to me that when opened here events “RhinoDoc.EndOpenDocument” are ignored.

or something is escaping here.

Any idea?

Hi @MatrixRatrix,

Rather than do something in a RhinoDoc.EndOpenDocument, why don’t you just want until the use uses one of your commands? You could maintain a flag on your plug-in and only ask when the flag is unset.

– Dale

You could also pack the 3dm inside an password protected archive, optionally giving it a „unique“ file ending and making your plugin the „only“ (obvious) way to extract the archive. That makes it at least a little bit more secure, because its at least encrypted then. But in case you store the password/key locally you won‘t get any true security at all. But yes, its for the average joe, so it will work good enough🙂

Thank @TomTom,

in fact I don’t really want to protect the document with "password ", it was just a way of exemplifying what I want.

I really want the document to be open only by my plugin and not open otherwise.

Your idea may be better for this purpose, now the question, how I make 3.dm pack?


1 Like

writing a 3dm works this way (rh6 only):


Now renaming a file-ending is simple… You’ ll just need to bring all puzzle pieces together :slight_smile:

Edit: If you don’t need password protection, maybe renaming the file ending is already sufficient enough.

Thank you, once I have a litle time I check your example.