Grasshopper

algorithmic modeling for Rhino

Is it possible to access a plugin's version from within AssemblyPriority?  I have a plugin that is doing some analytics reporting and I'd like to track the version of the plugin being used programmatically, rather than having to update it in the code every time (worried about forgetting from time to time).

I tried the Properties namespace but the only things accessible seem to be "Resources", which does not include the plugin version.

Thanks,

Marc

Views: 441

Replies to This Discussion

See attached

Attachments:

Thanks Panda!

I have given this a shot and unfortunately I haven't gotten it to work in this example.   The plugin is built and loaded.  I am grabbing my plugin ID from the Assembly information in Visual Studio, putting in a text panel, and converting to Guid before putting in the input.  I get an error: "Object reference not set to an instance of an object."

Also, why, when the input is null, do I get a result of 1.2.7.0?  I would expect an error when not supplying a plugin Guid.

Finally, keep in mind that I need to access this property in AssemblyPriority, on first load of the plugin itself (while the GH banner is showing).  Is the ComponentServer accessible at this time?

Thanks,

Marc

Sample Errors:

C#

VS (during AssemblyPriority)

I don't know what happened. But it works here!

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service