Jump to content

Recommended Posts

Posted (edited)

Hey guys!

 

Does anyone know how to get drag coordinates with grRead function, only as long as the left mouse button is pressed?

 

I've tried :


(setq [color=red]gr2[/color] ([color=blue]grRed[/color] (setq [color=#ff0000]gr1[/color] ([color=blue]grRead[/color]))))

 

 

(while
   (and (not (member (setq [color=red]gr2[/color] (grRead (setq [color=red]gr1[/color] ([color=blue]grRead[/color])) 15 0)
                        vt (cadr gr)  cd (car gr)) '(3 25)) ) ; 3=Click L, 25=Click R : key
          (not (member vt '(13 32)) )  ) ; Enter , Space key

  (princ "\n   Gr1 : ") (princ gr1)
  (princ "\n   Gr2 : ") (princ gr2) 
)

 

 

and does not work .

 

Code for left mouse button click is 3. But how can find out how long it is pressed?

 

 

Thank you for your help.

Edited by Costinbos77
Posted (edited)

Removed due to the modification by the OP in the first post :glare:

Edited by Tharwat
Posted

Try 3dOrbit command and you will see that only when the left mouse button is pressed, only then rotates the image.

 

Has anyone tried to write lisp code for this command?

Posted

What is it exactly that you are trying to accomplish? You talk about drag and then talk about 3d orbit.

Posted (edited)

I believe you would just add your command to the appropriate spot in the CUI. This is where the left mouse button is controlled.

 

regards,

 

Hippe013

 

 

er um.... Nevermind. I see what you want to do....

Edited by Hippe013
I get it now....
Posted (edited)

Hello!

 

Does anyone know how to find using AutoLISP, if the left button of the mouse is still pressed? Because if can access the information in the clipboard, it can be that too.

 

 

(setq v (vlax-get (setq htmlfile (vlax-create-object "htmlfile"))  'ParentWindow) )
#<VLA-OBJECT DispHTMLWindow2 000000002b83af70>
_$ (vlax-dump-object v t)
; DispHTMLWindow2: nil
; Property values:
;   applicationCache (RO) = #<VLA-OBJECT IHTMLApplicationCache 000000002bb22430>
;   clientInformation (RO) = #<VLA-OBJECT DispHTMLNavigator 000000002bbbd5b0>
;   clipboardData (RO) = #<VLA-OBJECT IHTMLDataTransfer 000000002bc06fa0>
;   closed (RO) = -1
;   defaultStatus = ""
;   document (RO) = #<VLA-OBJECT DispHTMLDocument 000000002bb63e70>
;   event (RO) = nil
;   external (RO) = nil
;   frameElement (RO) = nil
;   frames (RO) = #<VLA-OBJECT DispHTMLWindow2 000000002bb64140>
;   history (RO) = #<VLA-OBJECT DispHTMLHistory 000000002bb643c0>
;   innerHeight (RO) = 0
;   innerWidth (RO) = 0
;   length (RO) = 0
;   localStorage (RO) = nil
;   location (RO) = #<VLA-OBJECT DispHTMLLocation 000000002bb645f0>
;   maxConnectionsPerServer (RO) = 2
;   name = ""
;   navigator (RO) = #<VLA-OBJECT DispHTMLNavigator 000000002bbbd5b0>
;   offscreenBuffering = "auto"
;   onabort = nil
;   onafterprint = nil
;   onbeforeprint = nil
;   onbeforeunload = nil
;   onblur = nil
;   oncanplay = nil
;   oncanplaythrough = nil
;   onchange = nil
;   onclick = nil
;   oncontextmenu = nil
;   ondblclick = nil
;   ondrag = nil
;   ondragend = nil
;   ondragenter = nil
;   ondragleave = nil
;   ondragover = nil
;   ondragstart = nil
;   ondrop = nil
;   ondurationchange = nil
;   onemptied = nil
;   onended = nil
;   onerror = nil
;   onfocus = nil
;   onfocusin = nil
;   onfocusout = nil
;   onhashchange = nil
;   onhelp = nil
;   oninput = nil
;   onkeydown = nil
;   onkeypress = nil
;   onkeyup = nil
;   onload = nil
;   onloadeddata = nil
;   onloadedmetadata = nil
;   onloadstart = nil
;   onmessage = nil
;   onmousedown = nil
;   onmouseenter = nil
;   onmouseleave = nil
;   onmousemove = nil
;   onmouseout = nil
;   onmouseover = nil
;   onmouseup = nil
;   onmousewheel = nil
;   onmsgesturechange = nil
;   onmsgesturedoubletap = nil
;   onmsgestureend = nil
;   onmsgesturehold = nil
;   onmsgesturestart = nil
;   onmsgesturetap = nil
;   onmsinertiastart = nil
;   onmspointercancel = nil
;   onmspointerdown = nil
;   onmspointerhover = nil
;   onmspointermove = nil
;   onmspointerout = nil
;   onmspointerover = nil
;   onmspointerup = nil
;   onoffline = nil
;   ononline = nil
;   onpause = nil
;   onplay = nil
;   onplaying = nil
;   onpopstate = nil
;   onprogress = nil
;   onratechange = nil
;   onreadystatechange = nil
;   onreset = nil
;   onresize = nil
;   onscroll = nil
;   onseeked = nil
;   onseeking = nil
;   onselect = nil
;   onstalled = nil
;   onstorage = nil
;   onsubmit = nil
;   onsuspend = nil
;   ontimeupdate = nil
;   onunload = nil
;   onvolumechange = nil
;   onwaiting = nil
;   opener = nil
;   outerHeight (RO) = Unspecified error.
;   outerWidth (RO) = Unspecified error.
;   pageXOffset (RO) = 0
;   pageYOffset (RO) = 0
;   parent (RO) = #<VLA-OBJECT DispHTMLWindow2 000000002bb646e0>
;   performance = #<VLA-OBJECT DispHTMLPerformance 000000002bbfdbd0>
;   screen (RO) = #<VLA-OBJECT DispHTMLScreen 000000002bbbf5e0>
;   screenLeft (RO) = 0
;   screenTop (RO) = 0
;   screenX (RO) = Unspecified error.
;   screenY (RO) = Unspecified error.
;   self (RO) = #<VLA-OBJECT DispHTMLWindow2 000000002bb64460>
;   sessionStorage (RO) = nil
;   status = ""
;   styleMedia (RO) = #<VLA-OBJECT DispHTMLStyleMedia 000000002bb64370>
;   top (RO) = #<VLA-OBJECT DispHTMLWindow2 000000002bb64230>
;   window (RO) = #<VLA-OBJECT DispHTMLWindow2 000000002bb644b0>
; Methods supported:
;   addEventListener (3)
;   alert (1)
;   attachEvent (2)
;   blur ()
;   clearInterval (1)
;   clearTimeout (1)
;   close ()
;   confirm (1)
;   createPopup (1)
;   detachEvent (2)
;   dispatchEvent (1)
;   execScript (2)
;   focus ()
;   getComputedStyle (2)
;   getSelection ()
;   item (1)
;   moveBy (2)
;   moveTo (2)
;   msWriteProfilerMark (1)
;   navigate (1)
;   open (4)
;   postMessage (2)
;   print ()
;   prompt (2)
;   removeEventListener (3)
;   resizeBy (2)
;   resizeTo (2)
;   scroll (2)
;   scrollBy (2)
;   scrollTo (2)
;   setInterval (3)
;   setTimeout (3)
;   showHelp (3)
;   showModalDialog (3)
;   showModelessDialog (3)
;   toStaticHTML (1)
;   toString ()
T

 

 

Thanks in advance,

 

Costin

Edited by Costinbos77

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...