.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Check if focus is on or off DWG

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
439 Views, 2 Replies

Check if focus is on or off DWG

Anonymous
Not applicable
Hi, my name is Victor, I've been working developing on AutoCAD for a few months now. 
 
Right now I'm working on a plugin and I'm facing the challenge to know if DWG has the focus or at least if mouse pointer is over it. I know how to set to focus to the DWG but don't know how to check it. It has come to my mind to use the GetPoints() method so it will return if the focus is not on the DWG but it doesn't seem very elegant and would not be enough because if the focus is on the DWG it will not return the control until the user selects a point which we don't even need.
 
Could you provide any hint on what is the best way to accomplish this?
 
Thanks in advance.
Victor
0 Likes

Check if focus is on or off DWG

Hi, my name is Victor, I've been working developing on AutoCAD for a few months now. 
 
Right now I'm working on a plugin and I'm facing the challenge to know if DWG has the focus or at least if mouse pointer is over it. I know how to set to focus to the DWG but don't know how to check it. It has come to my mind to use the GetPoints() method so it will return if the focus is not on the DWG but it doesn't seem very elegant and would not be enough because if the focus is on the DWG it will not return the control until the user selects a point which we don't even need.
 
Could you provide any hint on what is the best way to accomplish this?
 
Thanks in advance.
Victor
2 REPLIES 2
Message 2 of 3
Virupaksha_aithal
in reply to: Anonymous

Virupaksha_aithal
Autodesk Support
Autodesk Support

Hi,

 

see if calling "Focus" as shown https://adndevblog.typepad.com/autocad/2013/03/use-of-windowfocus-in-autocad-2014.html. This will set the focus to DWG.

 

 



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

0 Likes

Hi,

 

see if calling "Focus" as shown https://adndevblog.typepad.com/autocad/2013/03/use-of-windowfocus-in-autocad-2014.html. This will set the focus to DWG.

 

 



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

Message 3 of 3
Anonymous
in reply to: Virupaksha_aithal

Anonymous
Not applicable

Hi Virupaksha.aithal,

 

 

 

0 Likes

Hi Virupaksha.aithal,

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report