Visualisation of bitmasks or alarm codes

More
3 weeks 4 days ago #63 by claes
Hi jds,

The syntax for the array is Da1->Alarmtext[I1].
I1 is a signed integer so I would also check for erroneous negative values
if (I1 <= 0 && I1 < 3).

Created objects will be a copies of the template object and contain the array values. New attributes in existing objects though will be empty.

/Claes

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

More
3 weeks 3 days ago #66 by jds
Oh boy, you don't want to know what I've tried instead of thinking logical  .
I think in case of an aggragate, if I want the text of the array to be copied I'll have to remove and re- add the component or edit the wbload file directly for minor changes, correct?

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

More
3 weeks 3 days ago #67 by claes
Yes, or you can write a script. Something like
Code:
main()   string oname;   string aname;   string value; # verify(1);   oname = GetClassList("BaseFcXylem");   while (oname != "")     aname = oname + ".Alarmtext[0]";     value = "text1";     SetAttribute(aname, value);     aname = oname + ".Alarmtext[1]";     value = "t2";     SetAttribute(aname, value);     ...     oname = GetNextObject(oname);   endwhile endmain

Execute from the command line in the configurator with '@scriptname'.

/Claes

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

More
3 weeks 3 days ago #68 by jds
Top! Learning day by day.
In the meantime I let chatgpt do the dirty work since I had to convert 255 alarmtext from the manual in a horrible formated table to be converted. Copied the table directly into the wb_load file at the correct places (and adjusting the array to the correct size) and the right classnames. Works like a charm. Now up to creating the whole class since this was just some testing :-)

Thanks a lot!

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

Time to create page: 0.433 seconds
Powered by Kunena Forum