Showing results 1 to 2 of 2

Thread: Strange Error while filling Rema

  1. #1
    mseidel Gast

    Default Strange Error while filling Rema

    Hi,

    I have a VBA-Wizard which fills a Rema with content from an excel sheet. First it reads the content into an array. Afterwards it should write the content form the array into the Rema, but that is when the error occures:

    "Run-time error '-2147467259 (80004005)':

    Method 'ClassIdx' of object 'IState' failed


    The code in this part of the wizard is:

    rema.StateItem(Index).Status = 16641
    rema.StateItem(Index).GroupIdx = ArrayState(Index).Alarmgruppe
    rema.StateItem(Index).ClassIdx = ArrayState(Index).Alarmklasse


    I tried to access the ClassIdx with a simplified code to check if the problem is somewhere in the rest of the code, but even:

    rema.StateItem(1).ClassIdx = 1

    did just lead to the same error.

    Thank you for your help.

  2. #2
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    881

    Default AW: Strange Error while filling Rema

    First those properties is a so called "DynProperties"
    Second those Dynproperties are called "KlasseIdx" resp. "GruppeIdx"
    -> when exporting the Rema to xml you can see the name of all properties

    I.e.
    'get the alarm class / alarm group of the Rema-State 2
    Debug.Print MyWorkspace.ActiveDocument.Remas.Item("testme").DynProperties("State[2].KlasseIdx")
    Debug.Print MyWorkspace.ActiveDocument.Remas.Item("testme").DynProperties("State[2].GruppeIdx")


    'set the alarm class of the Rema-State 2 to the ID 1
    MyWorkspace.ActiveDocument.Remas.Item("testme").DynProperties("State[2].KlasseIdx") = 1

    Regards,
    Herbert

Similar Threads

  1. Variable ant it's Rema value
    By softart2 in forum VSTA
    Replies: 10
    Last Post: 7th May 2013, 10:41
  2. GI Status Bit in REMA
    By softart2 in forum zenon Service Engine Supervisor
    Replies: 2
    Last Post: 2nd January 2012, 13:06
  3. Verzögerungszeit in REMA
    By hicom in forum zenon Service Engine Supervisor
    Replies: 5
    Last Post: 31st May 2010, 05:51
  4. Rema state
    By westbaaam in forum VBA
    Replies: 1
    Last Post: 30th November 2009, 06:32
  5. strange behavior
    By flajoso in forum VBA
    Replies: 4
    Last Post: 3rd September 2008, 16:08

Posting Rules

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