乐筑天下

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

[编程交流] Item Balloon - Leader

[复制链接]

1

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 14:44:48 | 显示全部楼层 |阅读模式
Hello everyone, first time poster.  I'm not a drafter but I do know how to use AutoCAD fairly well.  We have AutoCAD 2004 here.
 
I'm trying to come up with a LISP routine for an item balloon with two lines of text that is centre justified inside the balloon.  The balloon should connect to the item I'm marking with a line that does not have an arrow head on the end.
 
I have been able to do this with a single line of text, but I cannot seem to get it to work with two lines.  What it does is it will print the two text entries on top of each other.
 
Can anyone help me out?
 
Cheers.
回复

使用道具 举报

15

主题

335

帖子

322

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
75
发表于 2022-7-6 14:52:02 | 显示全部楼层
 
Try this lisp routine, might work for you. Or at least, a starting point.
I believe B3B has also been added to the routine, try it.
Callout.lsp
回复

使用道具 举报

14

主题

719

帖子

706

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
70
发表于 2022-7-6 14:53:58 | 显示全部楼层
Check this thread out, there are a few versions of a lisp in there that Lee Mac was kind enough to do for me - might be something you can work with.
回复

使用道具 举报

15

主题

335

帖子

322

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
75
发表于 2022-7-6 14:58:11 | 显示全部楼层
 
Lee Mac is the pro, great lisps. He must live lisp routines!
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:02:51 | 显示全部楼层
 
 
Many thanks Tankman
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:06:23 | 显示全部楼层
Sorry guys, just found a typo in the latest version of the LISP posted in the thread that Tiger refers to
 
Sorry guys
回复

使用道具 举报

1

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 15:09:31 | 显示全部楼层
Hey Guys, I've tried out all the lisp routines suggest here but no luck.  There was a couple that were close.  I believe the closest one was in callout called T1B.  But, it only prints fonts in the lower section of the circle below the cross line.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 15:16:21 | 显示全部楼层
 
Did mine not perform as you wanted?
回复

使用道具 举报

41

主题

301

帖子

265

银币

后起之秀

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

铜币
209
发表于 2022-7-6 15:16:52 | 显示全部楼层
This one i did not make my self. It works with out error, but it is not poished at all
I personally dont like it,
I use a dynamic block, with a few routines. I find its much nicer having it all blocked
 
 
  1.   (defun C:it(/ th pt1 pt2 linang arrpt2 txt bubrad )(initerr)   (SETQ LA (GETVAR "OSMODE"))   (SETQ LT (GETVAR "CELTYPE")) (command "OSMODE" 512) (command ".layer" "m" "dim" "c" "4" "dim" "L" "CONTINUOUS" "dim" \) (graphscr) (setq pt1 (getpoint "\nSelect tip of Arrow : ")) (command "osmode" 0) (setq pt2 (getpoint "\nSelect Centrepoint of Bubble: " pt1)) (setq th (* (GETVAR "DIMTXT")(getvar "dimscale"))) (setq txt (getstring "\nEnter Text : ")) (setq factor (/ 45 35.000000000000)) (setq bubrad (* factor th)) (command "circle" pt2 bubrad) (command "change" "L" "" "P" "C" 4 "") (setq linang (angle pt1 pt2)) (setq arrpt2 (polar pt2 linang (* -1 bubrad)))        (COMMAND "LEADER" pt1 arrpt2 "" "" "N") (command "text" "m" pt2 th "0" txt) (command "change" "L" "" "P" "C" 2 "")    (SETVAR "OSMODE" LA)   (SETVAR "CELTYPE" LT)(princ));;;*===========================================================(defun initerr () (setq oldlayer (getvar "clayer")) (setq oldsnap (getvar "osmode")) (setq oldpick (getvar "pickbox")) (setq temperr *error*) (setq *error* trap) (command "dimsah" "off") (command "dimse2" "off") (command "dimblk2" "") (princ))     ;defun;;;*===========================================================(defun trap (errmsg) (command nil nil nil) (if (not (member errmsg '("console break" "Function Cancelled"))     )   (princ (strcat "\nError: " errmsg)) )     ;                  (setvar "clayer" oldlayer) (setvar "blipmode" 0) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (command "dimsah" "off") (command "dimse2" "off") (command "dimblk2" "") (princ "\nError Resetting Enviroment ") (terpri) (setq *error* temperr) (princ))     ;defun;;;*===========================================================(defun reset () (setq *error* temperr) (setvar "clayer" oldlayer) (setvar "blipmode" 0) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (princ))     ;defun;;;*===========================================================
回复

使用道具 举报

15

主题

335

帖子

322

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
75
发表于 2022-7-6 15:22:07 | 显示全部楼层
 
I've heard it said a few times, "Lee Mac is hard to understand, he speaks with a lisp!"
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-4 21:58 , Processed in 0.337102 second(s), 72 queries .

© 2020-2025 乐筑天下

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