Showing results 1 to 2 of 2

Thread: Activate variables based on new structure elements

  1. #1
    Join Date

    Default Activate variables based on new structure elements


    we are working with structures which are imported from the PLC programming software. When we are updating this structures there are some new entries. When we have some variables which are based on this structures the new entries are inactive.

    In the editor it is possible to go to the new entry with right mouse button and select "Activate all variables based on that".

    But I want to do this in VBA, because there I know which entry is new!

    Is there a possibility?


  2. #2
    Join Date

    Default AW: Activate variables based on new structure elements

    You can do this with the method of the variable object called "ActivateSubItem"
    -> check out the help documentation of the programming interface at
    -> Object model -> Variable -> ActivateSubItem

    So if you have new entries in the datatype structure you need to loop through all variables, check if the variable bases on the new entry of the datatype structure (SubItem) - if so activate the variable with the above mentioned method.

    Doing this via the zenon Editor (with option "Activate all variables based on that") the same algorithm is used.


Similar Threads

  1. Replies: 5
    Last Post: 4th September 2013, 00:16
  2. Different drivers in one structure datatype
    By stolyarov_as in forum zenon Supervisor
    Replies: 2
    Last Post: 13th December 2011, 08:30
  3. Replies: 6
    Last Post: 17th November 2011, 00:05
  4. Program access to structure datatype variables
    By stolyarov_as in forum VBA
    Replies: 2
    Last Post: 8th August 2011, 14:21
  5. Executing a function based on computer name
    By craigdouglas in forum zenon Supervisor
    Replies: 1
    Last Post: 20th November 2008, 20:17

Posting Rules

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