Getting the plugin license infos

license

(Matthieu Arnold) #1

Hi, I created a vb.net plugin using the rhino/zoo license system, it works nicely but I can’t find anywhere how to access my plugin license infos from my code.

For example, I would like to to read plugin.licenseData.SerialNumber from a command, and change its behavior accordingly. (I don’t get why licensedata is not a member of Mycommand.plugin)

Thanks for your help


(Dale Fugier) #2

Hi Mattieu,

If you want access to your plug-in’s license data, then you should save the data generated by your plug-in’s Rhino.PlugIns.ValidateProductKeyDelegate delegate in some private data structure on your plug-in, so it can be retrieved to show in some UI later.

Make sense?

– Dale


(Matthieu Arnold) #3

Thanks Dale I got it, it’s working nicely. I had this idea earlier but I was wondering if it were the best approach. (Like reading data from rhino license manager)

Another related question: when the user is asked for a product key, there are also two other fields: “Name” & “Organization”. How can I retrieve these infos in Rhino.PlugIns.ValidateProductKeyDelegate ?

Matthieu


(Dale Fugier) #4

If you need these values to display is some UI, then just call PlugIn.GetLicenseOwner. Note, you’d call this after you’ve obtained a license.

– Dale


(Matthieu Arnold) #5

Ok, but can’t I use these values during the license validation? I wish to validate together the couple Name + Product Key


(Dale Fugier) #6

Currently no. The only data passed to your validator is the product license code.

Just curious, aren’t your product licenses unique? Just trying to understand why you need the user/company name too…

– Dale


(Matthieu Arnold) #7

The main idea was to avoid clients to share too easily their product key.
I think Rhino3D’s activation does this: it ask for an email adress matching the product key.

Anyway it’s fine, I’ll just use the product key.

Thanks for your help.

Best regards

Matthieu