乐筑天下

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

[编程交流] (assoc 270 (entlast))

[复制链接]

19

主题

60

帖子

41

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
95
发表于 2022-7-6 10:49:06 | 显示全部楼层
thanks for Lee Mac ! But in my case,(setq a  (cdr (assoc 270 (entget (xxx)))) if a not equal to 55 then it will call function to perform setup the units. In this case 270 is stand for ?
 
 
 
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 10:54:24 | 显示全部楼层
Well, what is the entity it is querying? i.e. what entity is 'xxx' in your example.
回复

使用道具 举报

19

主题

60

帖子

41

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
95
发表于 2022-7-6 10:57:04 | 显示全部楼层
thanks for your reply, it querying the drawing units from the drawing.
 
回复

使用道具 举报

11

主题

968

帖子

919

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
99
发表于 2022-7-6 11:03:14 | 显示全部楼层
I think you may be misunderstanding Lee's question. He's asking what entity are you getting the 270 code from, is it a line, a dimension, a style, or any number of other possible graphical or non-graphical entities inside the drawing. Depending on what entity type it is, 270 may have differing meanings - that's why it could mean material of an entity or Dimension Units of a dimension style.
 
When you state you're getting the drawing's measurement units, this is actually saved in a variable called InsUnits and you can get that using (getvar "InsUnits"). From the code and some discussions previously it seems that it's getting the code from a dimension style entity. You can obtain the same by setting the style current and then doing (getvar "DIMUNIT") - which is actually obsolete (use DIMLUNIT & DIMFRAC & DIMLFAC instead). Note a drawing may contain numerous styles which may each have their own "units" - so that even if a DWG is set to (say) Milli Meters, that particular dimension may still display the value in Inches.
回复

使用道具 举报

19

主题

60

帖子

41

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
95
发表于 2022-7-6 11:05:46 | 显示全部楼层
thanks ! I wil search pervious code to get the answer.
 
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-6 21:49 , Processed in 0.531144 second(s), 71 queries .

© 2020-2025 乐筑天下

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