Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Obsolete Version, Recommendations of VisuUtils instead

Singh
2021-06-22
2021-07-07
  • Singh

    Singh - 2021-06-22

    Hallo
    I have a warning and have No clue how to get rid of it.
    This line of code brings warning

    VisuElems.g_VisuManager.SetMainVisu(pClientData, 'V00SmartphoneMain');

    SetStartVisu Device: SPS-Logik: Application: C0357: POU 'SetMainVisu' wurde als obsolet markiert: Please use the methods of VisuUtils instead.

    Any help is appreciated?
    Thx
    Singh

     
  • Singh

    Singh - 2021-06-23

    Dear Sir,
    it looks better with feedbacks like Done and Error.
    I appreciate your help!
    Regards
    Singh

     
  • Singh

    Singh - 2021-06-23

    Hello Sir,
    Changing of Visu works!
    ist there any way in VisuUtils to know the Size of Client?
    I want to call different visu as per client size.
    Thx and Regards
    Singh

     

    Last edit: Singh 2021-06-23
    • kislov

      kislov - 2021-06-23

      Unfortunately I don't know the answer.
      Seems like IVisualizationClient does not contain something like pClientData^.rClientRect.ptBottomRight.iX and pClientData^.rClientRect.ptBottomRight.iY.
      And honesly it's pretty sad...

      But you can check this example:
      https://forge.codesys.com/prj/codesys-example/responsive-desi/home/Home/

       
  • Singh

    Singh - 2021-06-23

    i did look here thats why i used setMainVisu function from VisuElems....Responsive was the idea-giver!
    Exactly these lines of codes i am searching....

    pClientData^.rClientRect.ptBottomRight.iX
    pClientData^.rClientRect.ptBottomRight.iY.

    PRETTY SAD is the right word!

    i am looking if i could find something like.....

    GVL.pClientData := VisuElems.gClientManager.GetClientData(itfClient.ClientId);

    I am struggling further...there is always a way!
    maybe someone on Forge might get an idea :)
    I am thankful to you for your support!

    Regards
    Singh

     

    Last edit: Singh 2021-06-23
  • Singh

    Singh - 2021-06-23

    Hello Supporter,

    i ahve the size, but again Warning of Obsolete...

    *VisuElems.gClientManager.BeginIteration();
    GVL.pClientData := VisuElems.gClientManager.GetNextClient(); //>--This line brings Warning again!
    IF D <> 0 THEN

    W := GVL.pClientData^.rClientRect.ptBottomRight.iX;
    B := GVL.pClientData^.rClientRect.ptBottomRight.iY;
    

    ENDIF
    IF A = 12 THEN
    changeVisu(itfClientFilter := itfClientFilter, eError => eError, xExecute := xExecute, xDone=>xDone, xBusy=>xBusy, xError=>xError, sVisuName := 'V00Main');
    ELSIF A = 13 THEN
    changeVisu(itfClientFilter := itfClientFilter, eError => eError, xExecute := xExecute, xDone=>xDone, xBusy=>xBusy, xError=>xError, sVisuName := 'V01Two');
    ELSIF A = 14 THEN
    changeVisu(itfClientFilter := itfClientFilter, eError => eError, xExecute := xExecute, xDone=>xDone, xBusy=>xBusy, xError=>xError, sVisuName := 'V03Three');
    ENDIF*

     

    Last edit: Singh 2021-06-23
  • m.prestel

    m.prestel - 2021-06-30

    Please provide your project so we can help you find solutions.

    Best regards,
    Marcel

     
  • Singh

    Singh - 2021-07-01

    Hello Mr. Prestel,
    Thanks for the Offer and i am attaching sample project.

     
  • Singh

    Singh - 2021-07-01

    I am having problems in Project Attachment. It is not openig the File select menue. So i apologetically opened a new Thread to be able to update my project.
    Please see:-

    https://forge.codesys.com/forge/talk/Visualization/thread/350446013a/

     
    • Ingo

      Ingo - 2021-07-02

      Sorry for the problems!
      Attachments are working again.

       
  • Singh

    Singh - 2021-07-02

    Test Test 123 :)

     

    Last edit: Singh 2021-07-02
  • m.prestel

    m.prestel - 2021-07-05

    Attached you can find a different API to set the visualization depending on the client size.

    Best regards,
    Marcel

     
  • Singh

    Singh - 2021-07-06

    Hello Mr. Prestel,
    i checked the example. I would try to write the whole chronology so that you can help me effectively.
    Responsive Visualisation is what i need...

    1. I downloaded the previous example
    2. The Issue was Obsolete Library References
    3. Reason was VisuElems.g_VisuManager.SetMainVisu(pClientData, 'Smartphone');
    4. Then i used instead of SetMainVisu -> VU.FbChangeVisu
    5. Now i was having problems getting to pClientData (POINTER TO VisuElems.VisuStructClientData) to get the screen resolution.
    6. the example which you uploaded has still the warnings-> Obsolete Library References! As it uses VisuElems.g_VisuManager.SetMainVisu(pClientData, 'Smartphone')

    Thanks in Advance
    Regards
    Singh

     

    Last edit: Singh 2021-07-06
  • m.prestel

    m.prestel - 2021-07-07

    Hey,

    my bad..
    Attached should be a better example.

    In FbStartVisuClientFilter you can see how you can get pClientData in VisuUtils.

    Best regards,
    Marcel

     
  • Singh

    Singh - 2021-07-07

    Hallo Marcel,
    no issues at all. i do heartily appreciate that you are helping me.
    Sincere Regards
    Baldeep

     
    πŸ‘
    1

Log in to post a comment.