johnpieter 发表于 2022-7-6 10:00:18

_ai_dim_texthome Shortcommand

how to fix the shortcommand for the _ai_dim_texthome.this is for dim text move to home.

Tharwat 发表于 2022-7-6 10:12:30

You can use the .pgp file for making your Short-cut for that command.
 
From Cad menu -> Tools -> Customize -> Edit Program Parameters ....
Then add your desired short-cut for the command and colse the .txt file and after that use the command reinit if you don't want
to close and re-open Autocad once again.
 
Example ,
 

AAI,       *AI_DIM_TEXTHOME
 
Good luck.
 
Tharwat

johnpieter 发表于 2022-7-6 10:22:00

i am telling for the command tharwat
(defun c:DHOME()(command "_AI_DIM_TEXTHOME" " "))

The Buzzard 发表于 2022-7-6 10:38:23

From AutoCAD's help file,
 
Please take note to the line nelow in RED.
 
 
A command alias is an abbreviation that you enter at the command prompt instead of entering the entire command name.
For example, you can enter c instead of circle to start the CIRCLE command. An alias is not the same as a keyboard shortcut, which is a combination of keystrokes, such as CTRL+S for SAVE.
An alias can be defined for any AutoCAD command, device driver command, or external command. The second section of the acad.pgp file defines command aliases. You can change existing aliases or add new ones by editing acad.pgp in an ASCII text editor (such as Notepad). To open the PGP file, click Tools Customize Edit Program Parameters (acad.pgp)Tools menu Customize Edit Program Parameters (acad.pgp). The file can also contain comment lines preceded by a semicolon (.
NoteBefore you edit acad.pgp, create a backup so that you can restore it later, if necessary.
 
To define a command alias, add a line to the command alias section of the acad.pgp file using the following syntax:
abbreviation,*command
where abbreviation is the command alias that you enter at the command prompt and command is the command being abbreviated. You must enter an asterisk (*) before the command name to identify the line as a command alias definition.
If you can enter a command transparently, you can also enter its alias transparently. When you enter the command alias, the full command name is displayed at the command prompt and the command is executed.
You can create command aliases that include the special hyphen (-) prefix, such as those listed here, that accesses the version of a command that displays command prompts instead of a dialog box.
BH, *-BHATCHBD, *-BOUNDARY
Note: You cannot use command aliases in command scripts. Using command aliases in customization files is not recommended.
 
If you edit acad.pgp while AutoCAD is running, enter reinit to use the revised file. You can also restart AutoCAD to automatically reload the file.

Tharwat 发表于 2022-7-6 10:43:04

 
Check this out ...
 

(defun c:test (/ ss) ; Tharwat Dec 20 . 2010(if (setq ss (ssget '((0 . "*DIMENSION")))) ((lambda (i / a)(while    (setq a (ssname ss (setq i (1+ i))))       (command "_.dimedit" "_home" a "")      )       )    -1   ) (princ "\n No Dimensions selected") ) (princ "\nWritten by Tharwat") (princ) )
 
Tharwat

alanjt 发表于 2022-7-6 10:58:19

 
 
You don't need to step through the selection, just feed the selectionset to the command once and you're done.

Tharwat 发表于 2022-7-6 11:08:12

 
That's right Alanjt.
 
Thank you.
 
So here is another one ...
 

(defun c:test (/ ss) ; Tharwat Dec 20 . 2010(if (setq ss (ssget '((0 . "*DIMENSION"))))   (command "_.dimedit" "_home" ss "")      (princ "\n No Dimensions selected")         )(princ) )
 
Tharwat
页: [1]
查看完整版本: _ai_dim_texthome Shortcommand