0 Replies Latest reply on Jun 27, 2018 7:02 AM by Aleksandras Korolkovas

    AddIn command lost clicked state after one code line

    Aleksandras Korolkovas



      My addin have few toolbar buttons wich starts long lasting exports. I try async functions to run some independand data colectectors at same time. But here i got result which i cant explain and i didnt found it in web.


      I starting export by clicking toolbar button.

      Buton clicked.PNG

      Button stays in this state and model window is blocked until pass this code line.

      Dim resultDict As Dictionary(Of String, Double()) = Await subTask 'it is System.Threading.Tasks.Task (of TResult) type

      Result after code line:

      Buton released.PNG

      Command continues to do what it must do. Model window unblocked. Nothing happens if click same button again. After some time appears correct results.

      By the workflow i need keep blocked model window an button state must represent command is still running.