乐筑天下

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

[编程交流] Draw an 50*50*6 angle

[复制链接]

2

主题

5

帖子

3

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 11:08:47 | 显示全部楼层 |阅读模式
I would like to draw 50*50*6  an angle,  14000mm length & insert a block, I also draw a two cg line with cetane distanc. I wrote this Lisp. Which is not work properly. I am an old gay. please clarify  this lisp file where is wrong.
 
Lisp file is given below:
 
(Defun c:CbEl ()
  (setq tlen (getreal "\nEnter total span of cable Bridge:"))
  (setq en1 (getint "\nEnter No. of equal span:"))
  (setq esln (getreal "\nEnter eual span length:"))
  (setq en2 (getint "\n No. of last span:"))
  (setq ept1 (getpoint "\n Pick Start Point of Elevision:"))
  (setq tang (getint "\nEnter top chord angle:"))
  (setq tcg (getreal "\nEnter TopChord Beam Angle CG length:"))
  (setq bang (getint "\nEnter bottom chord angle:"))
  (setq bcg (getreal "\nEnter BottomChord Beam Angle CG length:"))
  (setq ebm (getint "\nEnter UB SEction :"))
  (dcgl)
  (Dbch)
     ;(Dtch)
)
(defun dcgl (/ bcscg bcecg tcscg tcecg)
  (setq bcscg (polar ept1 1.5708 bcg))
  (setq bcecg (polar bcscg 0 tlen))
  (setq tcscg (polar ept1 1.5708 (- 2150 tcg)))
  (setq tcecg (polar tcscg 0 tlen))
  (command "color" 1)
  (command "line" bcscg bcecg "")
  (command "line" tcscg tcecg "")
  (command "zoom" "extents" "")
  (command "color" "Bylayer")
)
(defun Dbch (/ bctm bctm2 bcsp bcep bctsp bctep bcfsp bcfep)
  (setq bctm (polar ept1 0 (/ tlen 2)))
  (setq bctm2 (polar bctm 1.5708 500))
  (if (equal ebm 203)
    (progn
      (Command "insert" "E203" ept1 "" "" "")
      (command "mirror" "last" "" bctm bctm2 "")
      (setq bcsp (polar ept1 0 86.6))
      (setq bcep (polar ept1 0 (- tlen 86.6)))
    )
    (progn
      (Command "insert" "E254" ept1 "" "" "")
      (command "mirror" "last" "" bctm bctm2 "")
      (setq bcsp (polar ept1 1.5708 93.2))
      (setq bcep (polar ept1 0 (- tlen 93.2)))
    )
  )
  (setq bctsp (polar bcsp 1.5708 6))
  (setq bctep (polar bcep 1.5708 6))
  (setq bcfsp (polar bcsp 1.5708 bang))
  (setq bcfep (polar bcep 1.5708 bang))
  (command "color" 3)
  (command "line" bcsp bcep bcfep bcfsp "c")
  (command "line" bctsp bctep "")
  (command "color" "Bylayer")
)
 
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

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

铜币
438
发表于 2022-7-6 11:29:22 | 显示全部楼层
 
We don't care about your sexual preferences.
回复

使用道具 举报

35

主题

2471

帖子

2447

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
174
发表于 2022-7-6 12:06:21 | 显示全部楼层
Posting a picture of what you want to achieve may help someone to debug your code.
At first glance your code is inserting a predefined block – make sure that is placed on a search path or provide the appropriate path in code (if not already defined in current drawing’s database).
 
Regards,
 
PS. Please don’t forget to format your codes to increase visibility.
回复

使用道具 举报

2

主题

5

帖子

3

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 12:17:44 | 显示全部楼层
We used a dwt file which contain block. Also when i watch variable value it show correct value. but when exicute or draw it does not work properly. also if we run it in R14 some time it exicute but in AutoCAD2009 it was not execuite properly.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-6 11:21 , Processed in 0.399117 second(s), 60 queries .

© 2020-2025 乐筑天下

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