magnifying glass of portion of drawing under cursor during a jig

magnifying glass of portion of drawing under cursor during a jig

O_Eckmann
Mentor Mentor
1,584 Views
11 Replies
Message 1 of 12

magnifying glass of portion of drawing under cursor during a jig

O_Eckmann
Mentor
Mentor

Hi,

 

We're drawing polyline on image or pointcloud, but image is pixelated and pointcloud is noised so to be sure to click in the middle of "line" user are doing lots of zoom in/out to verify good clicked position.

To avoid this, I would like to create a plug-in to show a "magnifying glass" near cursor or on a palette to see zoomed area under my cursor when drawing polyline in my jig object.

I thought of 4 solutions:

  1 : magnifying glass of Windows => no dev, but I just see bigger but not more precise

  2 : take snapshot of screen and view this image in my custom palette => snapshot at screen resolution have same problem than solution1 and plot at high resolution can take time and is not dynamic with my drawing

  3 : Divide my screen into 3 viewport, I can draw in my main viewport (CVPORT=2) and try to sync center of a small viewport (CVPORT=3) when dragging my jig => performance when updating viewport at each mouse movement??

I've found an article on DevBlog in C++ here, but in video sample, sync seems slow, perhaps due to events reactor or because it's a 3D view with heavy viewstyle. In my case, I'm inside my jig so no reactor and I always know in real time where is my cursor.

  4 : Use a "control" to see my drawing in my custom palette. In some vertical product (like Civil3D) in lots of dialog box, you have a preview of "block" or "label style" with viewcub and possible orbit / zoom

image.png

Do you have any other solution?

Is solution 4 available in .Net? How does it work? Is it a copy of my current drawing or a DWG database?

I think solution 3 is the easiest?

 

Thanks for your advice.

 

Olivier

Olivier Eckmann

EESignature

0 Likes
1,585 Views
11 Replies
Replies (11)
Message 2 of 12

moogalm
Autodesk Support
Autodesk Support

On the 4th option -

You can pursue the sample project, it is .NET version of ObjectARX Blockview sample.

 

https://www.keanw.com/2008/06/autocad-net-ver.html

 

0 Likes
Message 3 of 12

O_Eckmann
Mentor
Mentor

Hi Madhukar,

 

Thanks for this idea. I'll try but my drawing has a point cloud attached, I don't know if it's OK inside Blockview.

I come back if I get something.

 

Olivier

Olivier Eckmann

EESignature

0 Likes
Message 4 of 12

ranga.narasimhan
Advocate
Advocate

Hi,

 

Did you manage to develop the plugin that mimics a magnifying glass?

 

-Ranga

0 Likes
Message 5 of 12

matt.worland
Advisor
Advisor

Are you looking for something like this:
https://keanw.com/2014/05/adding-a-cursor-badge-in-autocad-2015-using-net.html

If my reply was helpful, please give a "Thumbs Up" or "Accept as Solution"
0 Likes
Message 6 of 12

ActivistInvestor
Mentor
Mentor

A 'cursor badge' is just an icon that appears near the cursor. It serves to Signal various conditions like not being able to select certain objects, and so forth. What the OP was looking for in this old thread is a bit more complicated.

0 Likes
Message 7 of 12

ranga.narasimhan
Advocate
Advocate

@matt.worland ,

Thanks for reply. @ActivistInvestor is correct. I was looking for the solution of the very first post. A magnifying glass, that will allow the user to have a peek zoomed view as the cursor moves.. I did make my own though.. I was replying to the original author to see if he found a solution.. If not I wanted him to offer my solution.. I made a prototype..

 

-Ranga

 

 

0 Likes
Message 8 of 12

matt.worland
Advisor
Advisor

Now I understand. That sounds like a fun project. If you feel like sharing, I'd be interested in seeing how it's done.

If my reply was helpful, please give a "Thumbs Up" or "Accept as Solution"
0 Likes
Message 9 of 12

ranga.narasimhan
Advocate
Advocate

sure.. here is a video clip for you. As I said before this is just a proof on concept/prototype..

 

can i share code here?

(view in My Videos)

 

-Ranga

0 Likes
Message 10 of 12

matt.worland
Advisor
Advisor

Hi @ranga.narasimhan,

I'm not seeing a video clip.
You can share code here via git repos links, attaching a file, or directly using the code frame </>

If my reply was helpful, please give a "Thumbs Up" or "Accept as Solution"
0 Likes
Message 11 of 12

ranga.narasimhan
Advocate
Advocate

Oh.. I dont know why you could not see the video. I am able to see.

 

I asked my friends' opinions too. They said that the magnifying rectangular lens takes over the mouse cursor.. As they cannot see the cursor, they feel they have no control..

 

So, I'll share the code after some tweak.. it is ugly as of now.. don't like sharing that way. 

 

(view in My Videos)

 

 

 

 

0 Likes
Message 12 of 12

ranga.narasimhan
Advocate
Advocate

@matt.worland ,

I decided to share as it is because tweaking will take me a week.  Here is the GitHub link. It has lots of bugs. Pls user with care. It may crash your acad session.

 

https://github.com/TechVinmeen/Magnifier2

 

This is my first GitHub project. Never used it before. Let me know if you are able to use it.

 

-Ranga

 

0 Likes