Jump to content

Show an attached image just by mouseovering


wary faraj

Recommended Posts

hi guys

I really want to help me to attach an image and hide it, but when the user take the mouse over the hidden image, he/she can see it, for example I want to send a daily report to my manager and I want to attach some Image in the drawing and hide it, But it can be seen by moseovering

 

please help

I really in need it

thank you I really appreciate your help for me

Link to comment
Share on other sites

  • Replies 29
  • Created
  • Last Reply

Top Posters In This Topic

  • BlackBox

    15

  • ReMark

    6

  • wary faraj

    5

  • Murph_map

    4

Top Posters In This Topic

Posted Images

Why not just put the image on a layer that is frozen?

 

Another option: use the Hide&Show lisp routine as posted at CADALYST magazine 09/05 Tip2058: (Turn Objects Invisible or Visible ©) by 2005 Andrzej Gumula.

Link to comment
Share on other sites

thank you very much ReMark

but please if you can please upload this lisp for me,

the first option isn't work for me please I want to hide the image and appear when I take a mouse over an object like a line or circle

thank you again

Why not just put the image on a layer that is frozen?

 

Another option: use the Hide&Show lisp routine as posted at CADALYST magazine 09/05 Tip2058: (Turn Objects Invisible or Visible ©) by 2005 Andrzej Gumula.

Link to comment
Share on other sites

Did you read my last post? #4

 

OK...here is a copy of the Hide&Show lisp routine. You just have to remove the .TXT from the file name and you're good to go. Remember that this routine was written by someone else. If you alter it in any way you should give the author his due recognition in the header.

 

Hide&Show.lsp.TXT

Link to comment
Share on other sites

Yeah I tried this one but it is great, but I want one that hides the image and show it by just mouseovering one object, like this image below

thank you very much

wall & dwg.jpg

Did you try the lisp I posted?
Link to comment
Share on other sites

... Thinking of something was the easy part :thumbsup:

 

It's the implementation (and prerequisite coding, debugging, etc.) that's the problem, in order to allow for Visual LISP to interface with the :vlr-Hover Event (aka MouseHover in Windows Forms speak)... And that's *IF* the .NET API permits such customization (not sure)!? :(... Otherwise, it's off to ObjectARX (C++ for AutoCAD), and even that may not support such customization.

Link to comment
Share on other sites

... Thinking of something was the easy part :thumbsup:

 

It's the implementation (and prerequisite coding, debugging, etc.) that's the problem, in order to allow for Visual LISP to interface with the :vlr-Hover Event (aka MouseHover in Windows Forms speak)... And that's *IF* the .NET API permits such customization (not sure)!? :(... Otherwise, it's off to ObjectARX (C++ for AutoCAD), and even that may not support such customization.

Well it's been five hours since you thought of it, Done yet? :)

Link to comment
Share on other sites

Giving this topic more thought, AutoCAD already supports MouseHover Events (i.e. Tool Tips, etc.).

 

Mind you I have tested nothing yet, but thinking out loud so-to-speak, I wonder if there's a way to employ Grread in this situation... Which would preclude the need for any custom code (other than the LISP itself, of course).

 

Admittedly, I do not use this function in any of my routines, but I know that others have been quite successful.

Link to comment
Share on other sites

... Adding to my previous post, the use of Grread would also require this be a LISP Command, and not a true Reactor/Event Monitor, although, conceptually speaking, methinks this command would involve a SysVar Reactor to monitor the DYNMODE System Variable, which is repeatedly cycled on/off when using something like this:

 

(defun c:FOO (/ gr)
  (while (and (setq gr (grread 5)) (= (car gr) 5))
    (print (cadr gr))
  )
  (princ)
)

 

... More information (and yes, time :P) is needed; but more to follow as well. :thumbsup:

Link to comment
Share on other sites

  • 4 weeks later...

** Update -

 

I thought I'd get back into this old thread a bit... As it happens, I was mistaken about the requirement for incorporating the MouseHover Event handler (a real shock to anyone who knows me :P).

 

While I've not finished coding the entire plug-in that does everything that the OP has requested here (to toggle the image on/off by hover), the draft version (attached) adaptation uses the Editor.PointMonitor Event handler to detect what entity is being hovered upon (in this case it looks for when you hover the frame of an raster image), and subsequently displays a ToolTip reporting the image, the Layer on which it resides, the image Name, and Path Properties.

 

ct_acimagehover18.draft2.jpg

 

As this is just a draft, I am not going to waste others' time by posting the source-code... If you'd like to take a crack at coding this yourself, feel free, as my draft offering is an adaptation of Kean's and Tony's code here:

 

Providing information on AutoCAD objects in a tooltip using .NET

 

 

 

To test the plug-in attached to this post, download the AcImageHover18.txt file, right click, unblock, remove the .TXT file extension leaving the file as a .DLL, then NETLOAD the resultant assembly, and use the newly added IMAGEHOVERON, or IMAGEHOVEROFF Commands to test.

 

** Note - This assembly was compiled using .NET 3.5, and tested successfully using Civil 3D 2011, 2012.

 

Cheers! :beer:

AcImageHover18.dll.txt

Edited by BlackBox
Screenshot attached
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...