乐筑天下

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

[编程交流] Inserting block (break line) u

[复制链接]

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 06:55:55 | 显示全部楼层 |阅读模式
Hi everyone,
 
I have a code that inserts a block that is included on all of my drawings. Sometimes a few hundred times on each drawing. It currently works, but I would like to eliminate a couple of the prompts to save pressing enter an extra 2 times.
 
I type the command "BB", then it prompts for insertion point, which is fine, then it prompts the following two things, which i would like to eliminate:
" Enter X scale factor, specify opposite corner, or [Corner/XYZ] : Enter Y scale factor : "  and
" Pick Insertion point "
 
after those it prompts for rotation, which is also fine.
 
 
Here is the code:
  1. (defun c:bb (/ pt) (while (setq pt (getpoint "\nPick Insertion point."))   (command "-insert" "1-20 BREAK" "_non" pt "" pause) ) (princ))
 
 
Thanks in advance,
 
Lyndon
回复

使用道具 举报

pBe

32

主题

2722

帖子

2666

银币

后起之秀

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

铜币
211
发表于 2022-7-6 07:13:23 | 显示全部楼层
  1. (command "_insert" "1-20 BREAK" "_Scale" "1" "_rotate" "0" "_non" pt "" pause)
回复

使用道具 举报

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:27:35 | 显示全部楼层
Thanks for the reply, but that did not work as i can no longer specify the rotation.
回复

使用道具 举报

26

主题

1495

帖子

20

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
118
发表于 2022-7-6 07:51:27 | 显示全部楼层
Maybe:
 
  1.    (command "-insert" "1-20 BREAK" "_non" pt 1 1 pause)
 
-David
回复

使用道具 举报

1

主题

3

帖子

2

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 08:01:52 | 显示全部楼层
Thank you David, that worked perfectly.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 10:15 , Processed in 0.685169 second(s), 62 queries .

© 2020-2025 乐筑天下

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