Use Custom Embedded Cursor - User Interaction Event

Use Custom Embedded Cursor - User Interaction Event

matt_jlt
Collaborator Collaborator
502 Views
3 Replies
Message 1 of 4

Use Custom Embedded Cursor - User Interaction Event

matt_jlt
Collaborator
Collaborator

Can anyone tell me how to use an embedded cursor (mycursor.cur) via the SetCursor command under user interaction events. I can use built in cursors just not able to get it working with my resource.

 

Sample below throws an error type mismatch.

 

oInteraction.SetCursor(CursorTypeEnum.kCursorTypeCustom, My.Resources.mycursor)

 

I have set the build action of the cursor to be embedded.

Win7

Inventor 2014

VB.Net

 

Thanks, Matt.

 

0 Likes
503 Views
3 Replies
Replies (3)
Message 2 of 4

xiaodong_liang
Autodesk Support
Autodesk Support
0 Likes
Message 3 of 4

matt_jlt
Collaborator
Collaborator

I have tried that method before but the issue is that the cursor I have is an internal (embedded into the dll) resource.

 

What i have done as a work around is to check if the cursor already exists in the application data directory, if not write the embedded cursor to the application data directory and point my custom cursor to that.

My main intention is to have my addin require no additional files to go along with the dll. I guess this will have to do until inventor supports the use of internal / embedded resources.

 

e.g My.Resources.myCursor.cur

 

thanks, Matt.

 

 

0 Likes
Message 4 of 4

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

yes, I also used the additional cursor files. The way to embed the cursor to the resource does not work. 

0 Likes