Grasshopper

algorithmic modeling for Rhino

Hi,

I've been creating a plug-In and would like to license it.

Where in the Code woud I do that.

I wrote this in the AssemlyInfo

public override GH_LibraryLicense License
        {
            get
            {
                Licensing lic = new Licensing();

                GH_LibraryLicense licenseType = GH_LibraryLicense.unset;

                if (lic.isLicensed)
                { licenseType = GH_LibraryLicense.commercial; }
                else
                {
                    licenseType = GH_LibraryLicense.expired;
                }
               
                return licenseType ;
            }
        }

Licensing beeing my own class handeling the licensing

But this seems to not do the trick. I thought / hoped that setting it to experied, would somehow load protect the component.

I'm looking for something like the

protected override Rhino.PlugIns.LoadReturnCode OnLoad(ref string errorMessage)

in "regular" Rhino plug-ins

Thanks

Karl

Views: 852

Replies to This Discussion

No Grasshopper won't take any action based on your license type, it is merely used for display. If you want to prevent loading, you'll have to implement the IGH_AssemblyPriority interface (I think that's what it's called) and return the correct enum from there.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service