乐筑天下

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

[编程交流] What's wrong in my code f

[复制链接]

96

主题

322

帖子

234

银币

后起之秀

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

铜币
474
发表于 2022-7-6 06:30:04 | 显示全部楼层 |阅读模式
How we can select some pline and fillet toghather them with spicifiy number by lisp?
is this code okey:cry:
 
  1. (set ss entsel)(command "fillet" "r"  0.07  )
回复

使用道具 举报

107

主题

615

帖子

575

银币

中流砥柱

Rank: 25

铜币
521
发表于 2022-7-6 06:37:01 | 显示全部楼层
try this  fillet r 0
回复

使用道具 举报

107

主题

615

帖子

575

银币

中流砥柱

Rank: 25

铜币
521
发表于 2022-7-6 06:39:57 | 显示全部楼层
add a button in your toolbars with this
^c^c_fillet r 0
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

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

铜币
474
发表于 2022-7-6 06:42:18 | 显示全部楼层
for selcted pline???
回复

使用道具 举报

1

主题

1069

帖子

1050

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
69
发表于 2022-7-6 06:47:47 | 显示全部楼层
Try this
 
  1. ;; to fillet polyline(setvar "filletrad" (getreal "\nRadius: "))(command "_fillet" "_P" (entsel "\nPolyline >>"))
回复

使用道具 举报

1

主题

475

帖子

481

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 06:51:50 | 显示全部楼层
Another
 
  1. (defun c:test (/  *error* old_frad ss r) (defun *error* (msg) (if old_frad (setvar 'filletrad old_frad))  (princ));; *error*(if  (setq ss (ssget "_:S:E:L" '((0 . "LWPOLYLINE"))))   (progn     (setq old_frad (getvar 'filletrad))     (if (setq r (getreal (strcat "\nSpecify fillet radius : ")))     (setvar 'filletrad r))     (command "_.fillet" "_p" ss)   );; progn);; if(*error* nil) (princ));; test
 
Henrique
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

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

铜币
474
发表于 2022-7-6 06:57:04 | 显示全部楼层
i have in my drawing some pline i wanna select them by rectangle selection mouse and with the command test  fillet them (no one by one select and fillet command)
any suggestion???
回复

使用道具 举报

1

主题

1069

帖子

1050

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
69
发表于 2022-7-6 07:00:18 | 显示全部楼层
Read Help file about window selection.
here is not a place to learn basics, do it by yourself
回复

使用道具 举报

96

主题

322

帖子

234

银币

后起之秀

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

铜币
474
发表于 2022-7-6 07:03:25 | 显示全部楼层
Dear fixo
I'm looking for lisp file for all of pline in my drawing selected them and fillet them by certain radius  the fillet command don't have this capability as i know.
回复

使用道具 举报

1

主题

475

帖子

481

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 07:07:56 | 显示全部楼层
@hosyn,
as fixo wrote, you have to try to write your codes, in the help files, under "Developer Help" (I don't know if it is correct, I don't have AutoCAD at the moment), have tuturials and functions explanations, and so on...
Do a google search for "autolisp tutorials"...
 
Meanwhile, here's one to get you started studying...
 
  1. (defun c:test (/ *error* old_frad ss r i) (defun *error* (msg)   (if old_frad     (setvar 'filletrad old_frad)   )   (princ) ) ;; *error* (if   (setq ss (ssget "_:L" '((0 . "LWPOLYLINE"))))    (progn      (setq old_frad (getvar 'filletrad))      (if (setq r (getreal (strcat "\nSpecify fillet radius : "))) (setvar 'filletrad r)      );; if      (setq i 0)      (repeat (sslength ss) (command "_.fillet" "_p" (ssname ss i)) (setq i (1+ i))      );; repeat    );; progn );; if (*error* nil) (princ));; test
 
hope that helps
Henrique
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 15:16 , Processed in 0.403813 second(s), 72 queries .

© 2020-2025 乐筑天下

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