In reply to Ankit_Patel:
It’s going to be very difficult to help you in this forum without explaining the complete flow of code execution. The only way to update a value on the SV side is when a thread cross the language boundary - when C calls an exported SV task or function and the SV arguments get assigned to SV variables, or when SV calls an inported C task or function, and that routine returns to update the output arguments.
I’m assuming your GUI has multiple threads running, and what I said earlier still holds - the DPI can only interact with a single thread. What you are trying to do may be too difficult to discuss in this forum and I suggest you seek out expert advice that may be more local to you.