乐筑天下

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

[编程交流] What's up with this???

[复制链接]

7

主题

39

帖子

32

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 16:56:12 | 显示全部楼层 |阅读模式
Hi All!
 
(Sorry for the long explanation, I hope it helps.)
I have this little routine that takes an object, testing with horizontal rectangles, makes a copy directly on top of the original, rotates it up 90 degrees, and then moves it over a certain distance to the left of the original.  I have a formula based on the "dimscale" system variable multiplied by 2.  The drafting standard here for text and dimensions is for every 12 inches of overall length of part, increase the text and dimension size by factor of 1.  So if the part is 24" to 35" for it longest side, the dimscale would be 2, the text and dimension sizes would be doubled.  My results have been, for example, on a 10" x 5" rectangle, it gets moved 2.5" instead of 2". On a 30" x 15" rectangle, it gets moved 7.5" instead of 4".  I can  place a point at the lower left corner of the horizontal rectangle and using the data in the distance variable ("dist"), it will move it the proper distance.  I don't know where the extra distance is coming from.  How can it move the object 7.5" when the variable contains "@4.0   
If anyone can assist, I would greatly appreciate it!  The code is below:
 

[code](defun c:cprt (/ bpoint dist) (setvar "cmdecho" 0) (setq factor (getvar "dimscale")) (setq bpoint "0,0") (setq obj (ssget "X" '((8 . "0")))) (command "copy" obj "" bpoint bpoint "") (command "rotate" "P" "" bpoint "90") (setq dist (* factor 2)) (setq dist (strcat "@" (rtos dist 2 1) "
回复

使用道具 举报

18

主题

1529

帖子

973

银币

中流砥柱

Rank: 25

铜币
649
发表于 2022-7-5 17:38:54 | 显示全部楼层
see:
https://www.theswamp.org/index.php?topic=51955.msg569852#msg569852
回复

使用道具 举报

7

主题

39

帖子

32

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 18:24:13 | 显示全部楼层
Thanks Roy_043!  I took a quick look at the link you posted.  Were you referring to the osnaps, or was it something else and I missed it?  Just wondering.
 
It appears to be the osnap issue!  Great shot Red 5!  I mean Roy_043!
 
and
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-13 13:33 , Processed in 1.759522 second(s), 58 queries .

© 2020-2025 乐筑天下

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