乐筑天下

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

[编程交流] Using an xref's scale fac

[复制链接]

10

主题

31

帖子

21

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
50
发表于 2022-7-6 08:59:50 | 显示全部楼层 |阅读模式
Hello,
 
I have a really simple routine that consists of picking two points on the screen and spitting out the distance between them (not really dimensioning, hence why I made a separate routine for it). Anyway, I got it to work by just having the user pick the two points and then acknowledging that the drawing scale is correct (if not, they can enter the correct scale), but then I thought I could remove this step altogether with a couple of more lines, which proved tougher than I thought.
 
All our floor plans are xrefs, so I decided to get the scale multiplier from the xref's scale factor. Since a lot of our drawings have more than one xref at different scales, though, I was using each xref's xclip frame information as a way to determine the location of the points I picked, and then grabbing the scale factor of the xref that corresponds to the xclip frame that contains the points. (whew)
 
Is there a more generalized way to do this? While this works in most cases, I had a couple of bugs here and there that I needed to figure out, but more importantly, the distances we're interested in may often be located outside the xclip frame, meaning I have to un-xclip the xref first, which means I wouldn't have that information available to me.
 
Any suggestions? Thanks a bunch.
 
(p.s. I wouldn't be opposed to approaching this problem in an entirely different way either, if anyone thinks my way just sucks. Something like an internal crossing selection of all objects near my point and filtering the selection to anything that is an xref?).
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-7-1 10:33 , Processed in 1.242015 second(s), 65 queries .

© 2020-2025 乐筑天下

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