TuttoCAD Forum

TuttoCAD Forum
[ Home | Registrati | Discussioni Attive | Discussioni Recenti | Segnalibro | Msg privati | Sondaggi Attivi | Utenti | Album Fotografico | Download | | Cerca | FAQ ]
Nome Utente:
Password:
Salva Password
Password Dimenticata?

 Tutti i Forum
 1 - TuttoCAD Software
 AutoLISP
 Reattore per MText
 Nuova Discussione  Rispondi
 Versione Stampabile Bookmark this Topic Aggiungi Segnalibro
I seguenti utenti stanno leggendo questo Forum Qui c'è:
Autore Discussione Precedente Discussione Discussione Successiva  

arri
Utente Master


Regione: Lombardia


14951 Messaggi

Inserito il - 31 agosto 2015 : 09:01:12  Mostra Profilo Invia a arri un Messaggio Privato  Rispondi Quotando
MTEditReactorV1-0.lsp

Program Description

This short code snippet was born from a question I received from a visitor of my site, asking whether it was possible to automatically select all text content when double-clicking on an MText object, as per the result of double-clicking on single-line text object.

As demonstrated by the GIF animation below, this behaviour is already part of the standard AutoCAD DDEDIT command when a single-line text object is edited or selected via a double-click, and so this utility provides a consistent result when double-clicking an MText object.

The utility is driven by a Visual LISP Command Reactor which monitors for the use of the MTEDIT command (the command invoked as standard when a user double-clicks on an MText object). When this command is invoked with an MText object already selected, the utility will send the keystrokes Ctrl+Home followed by Ctrl+Shift+End to the AutoCAD window, causing the text content to be automatically selected. When developing the code, I initially attempted to issue the Ctrl+A keystroke, however, this was unsuccessful in my tests.

Similar to my Layer Director application, the program is designed to enable the reactor automatically when the program is loaded, and the user may subsequently enable or disable the utility manually using the mteditreactoron and mteditreactoroff commands respectively.
  Discussione Precedente Discussione Discussione Successiva  
 Nuova Discussione  Rispondi
 Versione Stampabile Bookmark this Topic Aggiungi Segnalibro
Vai a:
TuttoCAD Forum © 2001-2010 CADLandia Torna all'inizio della Pagina
Pagina generata in 0,29 secondi.