how to show WaitCursor while custom program is running?

how to show WaitCursor while custom program is running?

liminma8458
Collaborator Collaborator
823 Views
3 Replies
Message 1 of 4

how to show WaitCursor while custom program is running?

liminma8458
Collaborator
Collaborator

Hi,

We have some API program which runs for a few seconds. I know there are a couple of ways to show the user something is running, such as progress bar , or you can change cursor style in interaction event, or you can do it within a Form application.  But if I only run a program which is purely mathematical or creating a model in background for a short period, is there any simple way to change the cursor to be the running circle (as in windows 10) style in the graphics window while the program is running?

Thanks
Limin
Inventor pro 2023 64 bit update 5.3; Windows 11 pro 64 bit version 24H2; Office 2013 64 bit

Download iCable in App Store to Create Cables Easily

0 Likes
Accepted solutions (1)
824 Views
3 Replies
Replies (3)
Message 2 of 4

Yong.Jing
Autodesk Support
Autodesk Support

@liminma8458  This is Inventor Product User Chinese forum. I will move your post to Inventor customiziong sub site. 



Yong Jing
Product Support Senior Specialist
Technical Support, CSS, GPS

If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
如果我的回帖解决了您的问题,请点击 "接受为解决方案" 按钮. 这可以帮助其他人更快的找到解决方案!
0 Likes
Message 3 of 4

JhoelForshav
Mentor
Mentor
Accepted solution

Hi @liminma8458 

See this short example iLogic rule to change the cursor. You'll have to use InteractionEvents.SetCursor.

In this example I set the cursor to the wait cursor, let the system sleep for 5 seconds and then stop the interaction that has this cursor. Instead of the sleep line, insert your code that should run while the cursor is changed 🙂

 

Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents
oInteraction.Start
oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514)
System.Threading.Thread.Sleep(5000)
oInteraction.Stop
Message 4 of 4

liminma8458
Collaborator
Collaborator

Jhoel,

It works great. Thank you so much!

Thanks
Limin
Inventor pro 2023 64 bit update 5.3; Windows 11 pro 64 bit version 24H2; Office 2013 64 bit

Download iCable in App Store to Create Cables Easily

0 Likes