Double Click Editing

44 views
Skip to first unread message

Bill Lape

unread,
Apr 10, 2002, 2:45:47 PM4/10/02
to
Several of the engineers in my company use AutoCAD 2000, which lacks the
double click property change feature. Does anyone know of a lisp routine
that approximates this feature?

Bill Lape
Integrator.com


Luis Esquivel

unread,
Apr 10, 2002, 4:02:33 PM4/10/02
to
Bill,

Here is one that will emulate 2000i - double click ability...

Regards,

Luis Esquivel
Using LspBOX you can quickly an easily generate drawings.
http://www.arqcom.com.mx/lspbox.htm


;; example provided by Luis Esquivel July 2001
;; to emulate the same ability of A2Ki
;; last modified: March 2002

(vl-load-com)

(if (not *doc*)
(setq *doc* (vla-get-activedocument (vlax-get-acad-object)))
)

(defun mouse-reactor (data)
(setq reactor
(vlr-mouse-reactor
data
'(
(:vlr-begindoubleclick
.
mouse-begindoubleclick
)
)
)
)
(vlr-set-notification reactor 'active-document-only)
(princ)
)

(defun mouse-begindoubleclick (obj lst / *object* compare pt ent ss)
(if lst
(progn
(if
(and
(eq 1
(logand
1
(vlax-variant-value (vla-getvariable *doc* "pickfirst"))
)
)
(setq ss (ssget "_i"))
(eq 1 (sslength ss))
)
(progn
(setq ent (ssname ss 0))
(setq pt (osnap (car lst) "_nea"))
(setq *object* (vlax-ename->vla-object ent))
(sssetfirst nil nil)
)
)
(if
(and
*object*
(equal (vlax-variant-value (vla-getvariable *doc* "cmdnames"))
""
)
)
(progn
(setq compare (strcase (vla-get-objectname *object*)))
(cond
((wcmatch compare "*DIM*,*TEXT*")
(vla-sendcommand *doc* "_.ddedit (princ pt) ")
)
((wcmatch compare "ACDBMLINE")
(vla-sendcommand *doc* "_.mledit ")
)
((wcmatch compare "*HATCH")
(vla-sendcommand *doc* "_.hatchedit (princ pt) ")
)
((wcmatch compare "ACDBLINE")
(vla-sendcommand *doc* "_.line ")
)
((wcmatch compare "*BLOCK*")
(initdia)
(vla-sendcommand *doc* "_.attedit (princ pt) ")
)
;; add here more ....
)
)
)
)
)
(princ)
)

(defun remove-mouse-system ()
(if (vlr-reactors :vlr-mouse-reactor)
(progn
(vlr-remove-all :vlr-mouse-reactor)
(setq reactor nil)
)
)
(princ)
)

(defun load-mouse-system ()
(if mouse-reactor
(mouse-reactor nil)
)
(princ)
)

(remove-mouse-system)
(load-mouse-system)

(princ)

Kevin Nehls

unread,
Apr 10, 2002, 3:41:44 PM4/10/02
to
If you have just AutoCAD 2000 you might try installing the version of
Express Tools off of the CD that comes with it. There is a dcprops command
that gives you this functionality. However, I don't know if this comes with
the version of ET that came with Acad2000.

HTH
--
Kevin Nehls


"Bill Lape" <Bill...@integrator.com> wrote in message
news:EEE9DFF603B0058A...@in.WebX.maYIadrTaRb...

Bill Lape

unread,
Apr 10, 2002, 4:00:33 PM4/10/02
to
I could not find the dcprops command in the express tools version that came
with AutoCAD 2000. It also wasn't listed in the current version on the
Autodesk website.


"Kevin Nehls" <kevinn at safeworks dot com> wrote in message
news:2EADF6E78D27B830...@in.WebX.maYIadrTaRb...

Kevin Nehls

unread,
Apr 10, 2002, 4:11:32 PM4/10/02
to
I know it's there in the "full" version. I don't know why it's not listed
on their website.

Here is the DCPROPS info from the ET help file:


DCPROPS

----------------------------------------------------------------------------
----

Configures double-clicking to open the Properties dialog box

Command: DCPROPS
Enter mode [ON/OFF] : Enter ON or OFF


Use the DCPROPS command to turn DCPROPS mode on or off. When DCPROPS mode is
on, double clicking an object opens the Properties dialog, which contains
property data for the selected object.


----------------------------------------------------------------------------
----
Express menu: Tools Double-click Properties
Command line: DCPROPS

HTH
--
Kevin Nehls


"Bill Lape" <Bill...@integrator.com> wrote in message

news:AF76D8A180D44E27...@in.WebX.maYIadrTaRb...

seegre...@gmail.com

unread,
Jul 28, 2018, 11:01:33 AM7/28/18
to
Bill

Here's a similar solution to Luis. Sorry I'm a little late in responding ! ! !

I called the lisp program: dc-edit.lsp.

Use appload to add it to your Startup Suite and away you go.

I have been using it for years and I'm still using it now July 2018 ! ! !

===========================================================================

(vl-load-com)
;--- DOUBLE LEFT CLICK TO SIMULATE 2000i OPERATION IN 2000 ---
(vlr-mouse-reactor "Edit text Object" '((:vlr-beginDoubleClick . DC-Edit)))
(defun DC-Edit (theReactor thePoint / objectPoint x y z e app doc cmd)
(setq objectPoint (car thePoint))
(setq e (cdr (assoc 0 (entget (ssname (ssget objectPoint) 0)))))
(setq x (rtos (car objectPoint) 2 3))
(setq y (rtos (cadr objectPoint) 2 3))
(setq z (rtos (caddr objectPoint) 2 3))
(setq app (vlax-get-acad-object)
doc (vla-get-activedocument app)
)
(if (/= e nil)
(progn
(if (or (= e "INSERT") (= e "TEXT") (= e "MTEXT") (= e "DIMENSION") (= e "ATTDEF") (= e "HATCH") (= e "MLINE"))
(progn
(if (= e "INSERT") (setq cmd (strcat "ddatte " x "," y "," z " ")))
(if (or (= e "TEXT") (= e "MTEXT") (= e "DIMENSION") (= e "ATTDEF")) (setq cmd "ddedit "))
(if (= e "HATCH") (setq cmd "hatchedit "))
(if (= e "MLINE") (setq cmd "mledit "))
)
(setq cmd "properties ")
)
(vla-sendcommand doc cmd)
)
)
)
Reply all
Reply to author
Forward
0 new messages