Author Topic: Issue with self multiplying members for MessageByItem  (Read 4795 times)

jspfeiffer@gmail.com

  • Newbie
  • *
  • Posts: 8
    • View Profile
Issue with self multiplying members for MessageByItem
« on: July 17, 2024, 09:30:26 PM »
I recently had my software upgraded to the latest version 399y, which is awesome because I can use MessageByItem. However I am having a very annoying problem is every time I copy over the same component to another form it duplicated all of the members, not only that the more you copy it to another form it will duplicate the members on top of that. So I have been trying to go back and delete them after that happens. The other problem is every time I launch the AdvancedHMI now it duplicates them back. I have no idea what I am doing wrong for the members to keep multiplying. My original amount of members I am suppose to have is 146, but its in the thousands when I go look at them again. Is their a setting I am missing? This is causing severe latency problems with the application. Any help is appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Issue with self multiplying members for MessageByItem
« Reply #1 on: July 18, 2024, 10:37:11 AM »
I have been able to replicate this, but not sure why it is doing it. Looking for a fix

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Issue with self multiplying members for MessageByItem
« Reply #2 on: July 18, 2024, 11:51:38 AM »
I haven't found the cause of this yet, but I do have possibly a better solution.

Attached is a patch that will add the property IniFileName to the MessageListByItem

https://www.advancedhmi.com/downloads/MfgControl.AdvancedHMI.ControlsPatch40.zip

- Download the file from the link
- Open your project in VS
- In Solution Explorer, expand down the AdvancedHMIControls Project
- Right click the \support folder and select Add->Existing Item
- Browse to and select the file that was downloaded
- In VS go to Window-> Close All Tabs
- Rebuild the Solution
- In one of the MessageListByItem, set the IniFileName property to .\Messages.txt

To add an IniFile:
- In Solution Explorer, Right Click the AdvancedHMI project and select Add-New Item
- Select Text File and name it Messages.txt
- Open the file
- Insert text in this format:
Code: [Select]
40001,Motor Overloaded,Yellow,Black
40002,UnderLayer Side Saftey Door Open -OR- Material Choke in Screw Feed,Red,White
40003,UL Carrier Alarm
40004,FM Carrier Alarm
- In Solution Explorer, click once on the Messages.txt to select it
- In Properties, set Copy To Output to Copy If Newer
-
« Last Edit: July 18, 2024, 11:53:40 AM by Archie »

jspfeiffer@gmail.com

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Issue with self multiplying members for MessageByItem
« Reply #3 on: July 22, 2024, 08:53:13 PM »
Okay thanks Archie, I will give that a try. I noticed in the code itself it reports correctly the members I added but in the popup window itself that where its multiplying. I'm not sure where the disconnect is.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Issue with self multiplying members for MessageByItem
« Reply #4 on: July 22, 2024, 09:09:05 PM »
It seems to be an issue with Visual Studio. When you paste on another form, the designer code that VS creates duplicates the entries.

jspfeiffer@gmail.com

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Issue with self multiplying members for MessageByItem
« Reply #5 on: July 24, 2024, 10:36:26 PM »
Okay, I will see if I can dig up why its duplicating the entries. At least its narrowed downed which side maybe causing the issue. I'm not sure how well the support is from Microsoft's end to help find a solution.
« Last Edit: July 25, 2024, 03:26:47 AM by jspfeiffer@gmail.com »