Page 2 of 2 FirstFirst 1 2
Showing results 11 to 13 of 13

Thread: IArchive reference

  1. #11
    Join Date
    02.02.2022
    Posts
    26

    Default Re: IArchive reference

    Is is implemented, but it was just not shown on screenshot because it was further up. thnxs.

    //################################################## ################################################## ##################

                IRuntimeArchive runtimeArchive = context.RuntimeArchiveCollection[1];

                if (runtimeArchive == null)
                {
                    //There is no archive, the user will be informed...
                    Debug.Print("No archive available!");
                    return;
                }
                IRuntimeArchiveFilter ArchiveFilter = runtimeArchive.FilterCollection.Create();

                for (int i = 0; i < runtimeArchive.VariableCollection.Count; ++i)
                {
                    //Add every archive variable to the archive filter
                    ArchiveFilter.AddVariable(runtimeArchive.VariableC ollection[i]);
                }

                IRuntimeArchiveFilterVariableCollection ArchiveVariables = ArchiveFilter.Query();

                //Get the first available filtered variable
                IRuntimeArchiveFilterVariable ArchiveFilterVariable = ArchiveVariables[0];

                if (ArchiveFilterVariable == null)
                {
                    //If there is no variable available, inform the user
                    Debug.Print("No filtered archive variable available!");
                    return;
                }

                ArchiveFilterVariable.ArchiveValueCollection.Creat e();
                IRuntimeArchiveValue ArchiveValue = ArchiveFilterVariable.ArchiveValueCollection[0];

                if (ArchiveValue == null)
                {
                    //No value available
                    Debug.Print("No value available!");
                }
                else
                {
                    //Output some information of the value
                    Debug.Print("Date / Time: " + ArchiveValue.Time.ToString());

                    Debug.Print("Recorded Value: " + ArchiveValue.Value);

                    Debug.Print("State: &H" + ArchiveValue.HigherState.ToString());
                }

                //################################################## ################################################## ##################

  2. #12
    Join Date
    02.02.2022
    Posts
    26

    Default Re: IArchive reference

    Hi, pending on this thread I would like to know if what I'm trying here is listed as an available funcionality of the software. 

    If it is not, not clear or not tested I would like to know too. 

    Thanks for all the support,

  3. #13
    Join Date
    02.02.2022
    Posts
    26

    Default Re: IArchive reference

    Hi, I am not sure why Im not getting a response.
    I did state that if it was not clear the solution that it would be good to know so I dont waste engineering time on this subject.

Similar Threads

  1. Passing variables to an array by reference
    By jesus_michel in forum Engineering Studio Logic & Logic Service (former zenon Logic Workbench & Runtime)
    Replies: 3
    Last Post: 27th February 2018, 18:23
  2. VBA macroses reference table
    By stolyarov_as in forum VBA
    Replies: 3
    Last Post: 30th October 2011, 23:47
  3. How to reference zenrt32.tbl in VS?
    By jens1199 in forum VSTA
    Replies: 5
    Last Post: 28th September 2010, 12:53
  4. Empty Cross Reference List
    By mastr in forum Engineering Studio & Service Engine (former zenon Editor & Runtime)
    Replies: 3
    Last Post: 2nd June 2009, 15:49

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •