Asset Label Within Asset Template Onclick functionality

I have been trying to do some scripting so that when you click on an Asset Label within an Asset Template it will take you to a certain page. It seems easy enough, however I am not sure how I can refer back to the Asset Label object being clicked. In the method AssetLabel1_OnClick I am using the sender object in an attempt to refer back to the asset label. Below is the line of code that is causing me trouble within the method.

ControlAssetLabel clickedAssetLabel = sender as ControlAssetLabel;

I keep getting the warning "Could not get delegate of type "AxiomCore2.Events.EventDelegates+OnClick" for event named "AssetTemplatePanel1_OnClick"Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type. at System.Delegate.CreateDelegate(Type type, Object target, String method, Boolean ignoreCase, Boolean throwOnBindFailure) at AxiomCore2.Managers.ScriptManager.ScriptEngine.TryGetEventDelegate[T](String eventMethodName, T& eventDelegate)"

I am still learning c# but this seems like it should be easy. Any comments would be really helpful!

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi ewiltshire ,

    You could use the 'NavigateSource' property of the Asset Label to navigate to another screen in the application. No scripting needed. If the screen you are navigating to is set to the same asset type as the asset template, it will also load the asset instance you clicked.

    You can also use the same property to navigate to another application, chart, or url.

print this pagePrint this page
Like Follow
  • 1 yr agoLast active
  • 1Replies
  • 57Views
  • 2 Following