乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 96|回复: 6

[编程交流] _ai_dim_texthome Shortcommand

[复制链接]

10

主题

35

帖子

25

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 10:00:18 | 显示全部楼层 |阅读模式
how to fix the shortcommand for the _ai_dim_texthome.this is for dim text move to home.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 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 ,
 
  1. AAI,       *AI_DIM_TEXTHOME
 
Good luck.
 
Tharwat
回复

使用道具 举报

10

主题

35

帖子

25

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 10:22:00 | 显示全部楼层
i am telling for the command tharwat
(defun c:DHOME()(command "_AI_DIM_TEXTHOME" " "))
回复

使用道具 举报

32

主题

1166

帖子

1146

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
159
发表于 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.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 10:43:04 | 显示全部楼层
 
Check this out ...
 
  1. (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
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 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.
回复

使用道具 举报

63

主题

6297

帖子

6283

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
358
发表于 2022-7-6 11:08:12 | 显示全部楼层
 
That's right Alanjt.
 
Thank you.
 
So here is another one ...
 
  1. (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
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-6 23:59 , Processed in 1.381891 second(s), 66 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表