Professional Communication
Software Development Tools

OPC Foundation member and certified logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions or issues. You do not have to own a commercial license in order to use the OPC Labs supportOur team is actively monitoring the forums, and provides replies as soon as possible.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible.

Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

OPC AE CustomAttributes

More
20 Jan 2026 07:18 #14554 by rabbi.mathake
Hi, thank you , yes it works on the latest version.

Please Log in or Create an account to join the conversation.

More
19 Jan 2026 09:30 #14553 by support
Replied by support on topic OPC AE CustomAttributes
Hello.

There is built-in trial license that delivers valid data for 30 minutes each time the process is run.
Separate evaluation key is only needed if, for your evaluation, the above time is not sufficient.

Regards
 
The following user(s) said Thank You: rabbi.mathake

Please Log in or Create an account to join the conversation.

More
19 Jan 2026 09:28 #14552 by rabbi.mathake
No problem kindly share the evaluation key please.

Please Log in or Create an account to join the conversation.

More
19 Jan 2026 07:51 #14551 by support
Replied by support on topic OPC AE CustomAttributes
There can be a bug in the older version. As I wrote, we no longer support it.

Test the same with the recent version. If ti works, purchase a version upgrade.

Best regards
 
The following user(s) said Thank You: rabbi.mathake

Please Log in or Create an account to join the conversation.

More
19 Jan 2026 05:54 #14550 by rabbi.mathake
Hi,  Unfortunately our current perpetual license is  expired only support up to 5.61, please advise it this might be one of reasons the sdk code provided doesnt work.


################################  I have this in my project. ######################################################
 public void Initialize()
 {
     _logger.LogInformation("AE Client: Initializing AE Client...");
     _fileLogger.Log("AE Client: Initialize()", false, "AE Client");

     _client = new EasyAEClient();

     try
     {
         if (Server != null)
         {
             _hostName = NormalizeHostForOpc(Server.SPrimHostname);
             _nodeName = Server.SPrimHostNodeName;
             _backupHostName = NormalizeHostForOpc(Server.SSecHostname);
             _backupNodeName = Server.SSecHostNodeName;
             failoverMode = Server.FailoverMode;


             AECategoryElementCollection categoryElements;
             try
             {
                 categoryElements = _client.QueryEventCategories(_hostName, _nodeName); // *******************************   I get error on this line ***********************************
             }
             catch (OpcException opcException)
             {
                 Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message);
                 return;
             }

             foreach (AECategoryElement categoryElement in categoryElements)
             {
                 Debug.Assert(categoryElement != null);

                 Console.WriteLine("Category {0}:", categoryElement);
                 foreach (AEAttributeElement attributeElement in categoryElement.AttributeElements)
                 {
                     Debug.Assert(attributeElement != null);

                     Console.WriteLine("    Information about attribute {0}:", attributeElement);
                     Console.WriteLine("        .AttributeId: {0}", attributeElement.AttributeId);
                     Console.WriteLine("        .Description: {0}", attributeElement.Description);
                     Console.WriteLine("        .DataType: {0}", attributeElement.DataType);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         _logger.LogError(ex, "AE Client: Failed to initialize host/node settings.");
         throw;
     }

 }

##############################  He is the error i get. ##############################################################
 System.InvalidOperationException: An item with the same key has already been added. Key: Underflow
       ---> System.ArgumentException: An item with the same key has already been added. Key: Underflow
         at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
         at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
         at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item)
         at OpcLabs.EasyOpc.Implementation.NetApi.AlarmsAndEvents.NetApiEasyToOpcNetApiAe.QueryEventCategories(ServerDescriptor serverDescriptor, AEEventType eventTypes)
         --- End of inner exception stack trace ---
         at OpcLabs.EasyOpc.Implementation.NetApi.INetApiEasyClientExtension.CheckException(INetApiEasyClient netApiEasyClient, Exception exception, Boolean isOtherMethod)
         at OpcLabs.EasyOpc.Implementation.NetApi.AlarmsAndEvents.NetApiEasyToOpcNetApiAe.QueryEventCategories(ServerDescriptor serverDescriptor, AEEventType eventTypes)
         at OpcLabs.EasyOpc.AlarmsAndEvents.Implementation.TimeoutImposingEasyAEClient.<>c__DisplayClass12_0`1.<ImposeTimeout>b__0()
         at System.Threading.Tasks.Task.InnerInvoke()
         at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
         at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
      --- End of stack trace from previous location ---
         at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
      --- End of stack trace from previous location ---
         at OpcLabs.BaseLib.Extensions.Internal.ExceptionExtension.Rethrow(Exception exception)
         at OpcLabs.BaseLib.Threading.TaskParallelism.Wait(IAsyncResult asyncResult)
         at OpcLabs.BaseLib.Extensions.Internal.ActionExtension.Perform(Action action, Int32 millisecondsTimeout)
         at OpcLabs.EasyOpc.AlarmsAndEvents.Implementation.TimeoutImposingEasyAEClient.ImposeTimeout[TResult](Func`1 operationFunction, Int32 millisecondsTimeout)
         at OpcLabs.EasyOpc.AlarmsAndEvents.Implementation.ErrorTransformingEasyAEClient.QueryEventCategories(ServerDescriptor serverDescriptor, AEEventType eventTypes)
         at OpcLabs.EasyOpc.AlarmsAndEvents.Implementation.ErrorTransformingEasyAEClient.QueryEventCategories(ServerDescriptor serverDescriptor, AEEventType eventTypes)

Please Log in or Create an account to join the conversation.

More
16 Jan 2026 12:00 - 16 Jan 2026 12:01 #14547 by support
Replied by support on topic OPC AE CustomAttributes
Hello.
version 5.61 is no longer supported. If you get the same error with the current version, report it here and we will diagnose it.

The information about the attributes is already contained in the result of QueryEventCategories, so the call to QueryCategoryAttributes is not needed. See this example:

opclabs.doc-that.com/files/onlinedocs/OPCLabs-ConnectivitySt...%20an%20event%20attribute.html  

Best regards
 
Last edit: 16 Jan 2026 12:01 by support.
The following user(s) said Thank You: rabbi.mathake

Please Log in or Create an account to join the conversation.

More
16 Jan 2026 06:54 #14545 by rabbi.mathake
This message contains secure information

Please Log in or Create an account to join the conversation.

More
15 Jan 2026 14:05 #14544 by support
Replied by support on topic OPC AE CustomAttributes
Hello.

This example shows how to specify which custom attributes should be delivered with each event category:

opclabs.doc-that.com/files/onlinedocs/OPCLabs-ConnectivitySt...ieve%20attribute%20values.html

I hope it helps.

Best regards

Please Log in or Create an account to join the conversation.

More
15 Jan 2026 12:25 #14543 by rabbi.mathake
This message contains secure information

Please Log in or Create an account to join the conversation.

Moderators: supportvaclav.zaloudek
Time to create page: 0.142 seconds