Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ping Jason Piercey - Tedit.lsp

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
jrl5735
922 Views, 6 Replies

Ping Jason Piercey - Tedit.lsp

Jason,

 

I've just recently upgraded to ACAD2015 and found that the express tools version of Tedit.lsp wouldn't work. I dug up your routine from my library and tried to use it but without success. I edited your lisp routine by changing the command line from DDedit to Textedit

 

(progn
      (setq i -1)
      (repeat (sslength ss)
	(setq ename (ssname ss (setq i (1+ i))))
	(setq data (cdr (assoc 0 (entget ename))))
	(cond
	  ((wcmatch data "TEXT,ATTDEF,MTEXT,DIMENSION,MULTILEADER")
	   (command "._textedit" ename "") )

 

This seems to have made the routine operate properly.

 

Without this change I was getting

 

<Entity name: FFB10F40> at the command line after the first selection of a piece of text.

 

I assumed the message was due to the command DDedit and Textedit having been swapped or somesuch by AutoCAD. I thought I'd let you know of my edits and check to see if you think this is the appropriate method for getting it to work in ACAD 2015.

 

J. Logan

J. Logan
Control Design Support Specialist
AutoCAD 2018
AutoCAD Map 3D
Windows 10
6 REPLIES 6
Message 2 of 7
rkmcswain
in reply to: jrl5735

If you do it like this.... @Jason.Piercey 

....he'll get a notice.

 

And yes, DDEDIT was replaced by TEXTEDIT for 2015.

 

 

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 7
jrl5735
in reply to: rkmcswain

Good to know. Thanks

J. Logan
Control Design Support Specialist
AutoCAD 2018
AutoCAD Map 3D
Windows 10
Message 4 of 7
Jason.Piercey
in reply to: jrl5735

Here is the latest version I have in my library

 

; Jason Piercey . May 29th, 2003
; similar command replacement for the Express Tool
; called TEDIT that was left out of AutoCAD 2004.

; edit any of the following in one operation.
; Text, Mtext, Attdef, Attributed Inserts,
; Dimensions, ArcAlignedText, and MultiLeaders

; briefly tested, if any trouble just say so.

; Revised: 06/09/2008 JP
;  - added support for multileaders
;  - reworked error handler and exiting

; Revised 03/31/2014
;  - DDEDIT is obsolete with AutoCAD 2015
;  - Replaced DDEDIT with TEXTEDIT

(defun c:tEdit (/ echo *error* ss i ename data)
  (setq echo (getvar "cmdecho"))
  (setvar "cmdecho" 0)
  
  (defun *error* (msg)
    (cond
      ((and
	 msg
	 (not (member msg '("Function cancelled" "quit / exit abort"))) )
       (princ (strcat "\ntEdit error: " msg))
       )
      (t princ)
      )
    (setvar "cmdecho" echo)
    )

  (if (setq
	ss
	 (ssget
	   '((-4 . "<or")
	     (0 . "TEXT,MTEXT,ATTDEF,ARCALIGNEDTEXT,DIMENSION,MULTILEADER")
	     (-4 . "<and") (0 . "INSERT") (66 . 1) (-4 . "and>")
	     (-4 . "or>")
	     )
	   )
	)
    (progn
      (setq i -1)
      (repeat (sslength ss)
	(setq ename (ssname ss (setq i (1+ i))))
	(setq data (cdr (assoc 0 (entget ename))))
	(cond
	  ((wcmatch data "TEXT,ATTDEF,MTEXT,DIMENSION,MULTILEADER")
	   (command "._textedit" ename "") )
	  
	  ((= "ARCALIGNEDTEXT" data) (command "._arctext" ename))
	  
	  ((= "INSERT" data) (command "._ddatte" ename))
	  
	  )
	(while (> (getvar "cmdactive") 0) (command pause))
	)
      )
    )
  (*error* nil)
  (princ)
  )

 

And BTW, RK's suggestion worked for me getting the notification.  I don't check in much these days (slow forums and dreadful interface keep my participation to a minimum)

Message 5 of 7
jrl5735
in reply to: Jason.Piercey

Thanks Jason. Much appreciated.

J. Logan
Control Design Support Specialist
AutoCAD 2018
AutoCAD Map 3D
Windows 10
Message 6 of 7
Jason.Piercey
in reply to: jrl5735

You're welcome.

Message 7 of 7
cadguy9977
in reply to: Jason.Piercey

Any luck with getting tedit.lsp to work in Civil 3D 2018?

 

Here is what the command line says after selecting the text entities:

"Unknown command "ED". Press F1 for help.
<Entity name: AD2B2D40>"


Tags (2)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost