Author Topic: DBL Click reactor  (Read 5474 times)

0 Members and 1 Guest are viewing this topic.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
DBL Click reactor
« on: March 06, 2009, 01:28:25 PM »
Possible?  I want to create a Dbl click reactor for a certain block (or blocks with certain params.  Is this possible.  Everything i see say unless you unload the Autocad dblclick arx it isn't possible.

Help?
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

ronjonp

  • Needs a day job
  • Posts: 7531
Re: DBL Click reactor
« Reply #1 on: March 06, 2009, 02:02:49 PM »
You can do it with reactors...I think you just have to set dblclkedit to 0.

Here's an example by Luis E.

http://www.theswamp.org/index.php?topic=11566.msg145485#msg145485

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

GDF

  • Water Moccasin
  • Posts: 2081
Re: DBL Click reactor
« Reply #2 on: March 06, 2009, 02:10:44 PM »
check out James Buzbee's Double Click Reactor
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: DBL Click reactor
« Reply #3 on: March 06, 2009, 02:22:25 PM »
I saw both of those.  LE's version turns off dblclick all together.  I want it on for other things but I want it off for one block.  JB's adds action to certain commands.

I may have to get a bit more creative.  I did see a post that brings up the Block editor then checks the block name it it matches a certain criteria then it closes the editor and preforms said task.??

Still looking for answers....
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Spike Wilbury

  • Guest
Re: DBL Click reactor
« Reply #4 on: March 06, 2009, 02:53:03 PM »
I saw both of those.  LE's version turns off dblclick all together.  I want it on for other things but I want it off for one block.  JB's adds action to certain commands.

I may have to get a bit more creative.  I did see a post that brings up the Block editor then checks the block name it it matches a certain criteria then it closes the editor and preforms said task.??

Still looking for answers....

have been a while - i guess it is possible - but why not using: vlr-miscellaneous-reactor & :vlr-pickfirstmodified ?

i did several routines using that.

now, do you want to try it yourself first, or prefer a working sample?

let me know,

luis.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: DBL Click reactor
« Reply #5 on: March 06, 2009, 03:30:24 PM »
I'll give it a go..

 This will make only my second attempt at a reactor <This should be a hoot>

I'm sure that I'll be back....
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: DBL Click reactor
« Reply #6 on: March 06, 2009, 03:36:40 PM »
?

Would it be possible to use a command reactor,

-check for the Block editor
-then check the block name
-launch my program?

Just putting this out there...
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Spike Wilbury

  • Guest
Re: DBL Click reactor
« Reply #7 on: March 06, 2009, 03:54:24 PM »
Tim,

Try the attached routine (no idea if it is what you are looking for), I did it for copy blocks automatically by simple touching any block - you may want to add the filter for the block name and maybe also to handle more than one. hth.

luis.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: DBL Click reactor
« Reply #8 on: March 06, 2009, 04:00:23 PM »
Thais prety neat Luis.  I'll look into converting it to meet my needs.  If I have any problems I'll be back  :mrgreen:
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Spike Wilbury

  • Guest
Re: DBL Click reactor
« Reply #9 on: March 06, 2009, 04:06:57 PM »
Thais prety neat Luis.  I'll look into converting it to meet my needs.  If I have any problems I'll be back  :mrgreen:

That's great ! :)

uncoolperson

  • Guest
Re: DBL Click reactor
« Reply #10 on: March 06, 2009, 08:18:15 PM »
here's mine, didn't look at le's, but i bet his is a lot nicer

Code: [Select]
(DEFUN begindoubleclick (reactorobject listofsomething / cmd doc obj ownerobj point)
  (IF (NOT (AND (= (GETVAR "cmdactive") 0) (SSGET "I")))
    (EXIT)
  )
  (SETQ cmd   "_.PROPERTIES"
point listofsomething
obj   (SSNAME (SSGET "I") 0)
doc   (VLAX-GET (VLAX-GET-ACAD-OBJECT) "activedocument")
  )
  (IF obj
    (PROGN (SETQ ownerobj (STRCASE (VLAX-GET (VLAX-ENAME->VLA-OBJECT obj)
     "objectname"
   )
  )
   )
   (COND ((= ownerobj "ACDBBLOCKREFERENCE")
  (SETQ gbl_wd_rightclick_ent obj)
  (VLA-SENDCOMMAND doc "(princ (c:menueditwire) ) ")
)
((= ownerobj "ACDBMTEXT")
  (VLA-SENDCOMMAND doc "_.MTEDIT ")
)
(T (VLA-SENDCOMMAND doc (STRCAT cmd " ")))
   )
    )
  )
)
(DEFUN loaddoublclick (/)
  (IF (/= (TYPE doubleclickreactor) 'VLR-MOUSE-REACTOR)
    (SETQ doubleclickreactor
   (VLR-MOUSE-REACTOR
     nil
     '((:VLR-BEGINDOUBLECLICK . begindoubleclick))
   )
    )
  )
  (IF (NOT (VLR-ADDED-P doubleclickreactor))
    (VLR-ADD doubleclickreactor)
  )
  (IF (MEMBER "acdblclkedit.arx" (ARX))
    (ARXUNLOAD "acdblclkedit.arx" nil)
  )
  (PRINC)
)

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: DBL Click reactor
« Reply #11 on: March 06, 2009, 09:36:48 PM »
I am having the feeling that I am not going to be able to do what I want with a reactor.  I want to run a program when a block is selected but the program has a dialog.  I don't think that I can do this??

Any help.. I don't know a thing about reactors...
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

Spike Wilbury

  • Guest
Re: DBL Click reactor
« Reply #12 on: March 06, 2009, 09:49:18 PM »
I am having the feeling that I am not going to be able to do what I want with a reactor.  I want to run a program when a block is selected but the program has a dialog.  I don't think that I can do this??

Yes you can do that.

Quote
Any help.. I don't know a thing about reactors...

In my case, I lost all my practice about lisp and more about reactors   :-(

- but did a similar routine in the past (using object reactors) - will try to find it and if possible to post it here.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: DBL Click reactor
« Reply #13 on: March 06, 2009, 09:57:14 PM »
Thanks Luis.  Every time I think I may have it, I get an error about Not an AutoCAD command..... when I try to fire my program.
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

uncoolperson

  • Guest
Re: DBL Click reactor
« Reply #14 on: March 07, 2009, 12:18:59 AM »
isn't there (not at autocad now) a lisp function to fire off dos commands?