乐筑天下

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

[编程交流] Block Insert, Center and Auto

[复制链接]

1

主题

5

帖子

4

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 08:14:58 | 显示全部楼层
Thanks BIGAL!
 
So I've completed this Lisp how I'd like it to work. Thanks for all the help peoples! The lisp is below and the block is attached for anyone that wants to use!
 
  1. ;;;RTAG(defun c:RTAG\ (/ pt1 pt3 rx ry pt5) (setq        atrq (getvar 'attreq)atd  (getvar 'attdia) ) (setvar 'Attreq 1) (setvar 'attdia 0) (initget 1) (setq pt1 (getpoint "\nFirst Room Corner: ")) (initget 1) (setq pt3 (getcorner pt1 "\nOpposite Room Corner: ")) (setq att1 (getstring "\nEnter Room Name Top")) (setq att2 (getstring "\nEnter Room Name")) (setq rx (abs (- (car pt3) (car pt1)))) (setq ry (abs (- (cadr pt3) (cadr pt1)))) (command "_INSERT""Tag_Room-Dim""_scale" "1"(polar pt1 (angle pt1 pt3) (* (distance pt1 pt3) 0.5))""att1(strcat "%%U" att2)(strcat (rtos rx 4 0) "x" (rtos ry 4 0)) (setvar 'Attreq atrq) (setvar 'attdia atd) (princ))
 
Tag_Room-Dim.dwg
回复

使用道具 举报

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-6 08:19:21 | 显示全部楼层
 
Select "Go Advanced" at the lower right of the reply box, they code tag button (#) should be there or alternately, add the tags yourself
  1. . (no space between the E and the bracket)
  2.  
  3. I fixed your post this time.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-10 10:33 , Processed in 0.544039 second(s), 54 queries .

© 2020-2025 乐筑天下

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