乐筑天下

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

[编程交流] Lengthen-delta

[复制链接]

1

主题

6

帖子

5

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 06:58:22 | 显示全部楼层 |阅读模式
Hey guys,
 
I just tried to make my very first lisp routine -- it's supposed to choose the delta option in the lengthen command so I don't have to. It seems to work fine, but I can't figure out how to keep it from displaying two lines of "enter delta length." I tried removing the (princ), but then it put "nil" after the first line -- the command still worked. Any suggestions on fixing this? Thanks!!
 
-Kate
 
  1. ;;;Lengthen Delta(defun c:ld() (command "lengthen" "de") (princ))
回复

使用道具 举报

18

主题

434

帖子

422

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
94
发表于 2022-7-6 07:12:42 | 显示全部楼层
like this?
  1. (defun c:ld()  (command "lengthen" "de" pause pause "")  (princ) )
or a bit more complicated, but with the same functionality:
  1. (defun c:ld( / cmd) (setq cmd (getvar "cmdecho")) (setvar "cmdecho" 0) (command "lengthen" "de" pause pause "") (setvar "cmdecho" cmd)  (princ) )
回复

使用道具 举报

1

主题

6

帖子

5

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:18:50 | 显示全部楼层
Fuccaro,
 
The first one *almost* works...but it ends after one pick (I think that's the "" at the end?) -- I tried playing around with deleting the pauses, but that put in extra lines around the "Select an object to change or [undo]:"...not quite as annoying as it was when I first tried the lisp, but I'm still not quite sure where the extra lines are coming from.
回复

使用道具 举报

18

主题

434

帖子

422

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
94
发表于 2022-7-6 07:25:46 | 显示全部楼层
May I try again?
  1. (defun c:test() (setvar "cmdecho" 0) (princ "\n Distance? ") (command "lengthen" "de" pause) (princ) )
回复

使用道具 举报

1

主题

6

帖子

5

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:37:39 | 显示全部楼层
Yay! That's it! Not bad for being on vacation... ;-) Hope you enjoy it!
回复

使用道具 举报

17

主题

70

帖子

21

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
120
发表于 2022-7-6 07:42:00 | 显示全部楼层
Where you on vacation Fuccaro?Do you ever stop working?
回复

使用道具 举报

0

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-6 07:50:22 | 显示全部楼层
I just want to know how to draw a ten feet line using the delta command at the command line.
回复

使用道具 举报

18

主题

434

帖子

422

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
94
发表于 2022-7-6 08:00:27 | 显示全部楼层
The discussion was about lengthen an existing line.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 10:35 , Processed in 0.470753 second(s), 79 queries .

© 2020-2025 乐筑天下

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