乐筑天下

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

[编程交流] Template (dwt) system variable

[复制链接]

56

主题

259

帖子

213

银币

后起之秀

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

铜币
270
发表于 2022-7-5 18:30:57 | 显示全部楼层 |阅读模式
Hi,
 
would anyone know how to know which template was started in a drawing?
 
I'm trying to make some lisp routine start when it's that specific template that starts.
 
Thanks!
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-5 18:43:26 | 显示全部楼层
Once the new drawing is saved as a "dwg" wouldn't that information just go away?
回复

使用道具 举报

56

主题

259

帖子

213

银币

后起之秀

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

铜币
270
发表于 2022-7-5 18:52:19 | 显示全部楼层
I'm not sure that's what I'm trying to figure out!
 
If i'd know at startup the system variable for the template maybe i could fallow it and see it the drawing keeps the information.
回复

使用道具 举报

24

主题

1265

帖子

1028

银币

后起之秀

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

铜币
362
发表于 2022-7-5 18:59:47 | 显示全部楼层
This was recently discussed, I think in the Autodesk forums.
IIRC, there isn't any way to tell because that data is not stored in the drawing.
 
Having said that, you could embed some non-graphical data in a template drawing (for example, xdata tied to layer 0) that you could later query.
Wouldn't help now, but it could in the future.
回复

使用道具 举报

11

主题

93

帖子

82

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
55
发表于 2022-7-5 19:03:54 | 显示全部楼层
 
One clue would be to check the dimstyle and find the matching template in the template file you have an that if the dimstyle was not altered importing from other drawings since dimstyle does follow when stuff is inserted.
 
HTH
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-5 19:10:23 | 显示全部楼层
And if every template uses the same dimstyle then what?
回复

使用道具 举报

11

主题

93

帖子

82

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
55
发表于 2022-7-5 19:19:41 | 显示全部楼层
 
next step would be to check the loaded linetypes and frames along with sheet sets
if they are all the same what is the point of having them under a different name in that case?
回复

使用道具 举报

56

主题

259

帖子

213

银币

后起之秀

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

铜币
270
发表于 2022-7-5 19:27:39 | 显示全部楼层
Indeed! different template should me different layers or layout. Well that should give me a few idea's thank alot!!
回复

使用道具 举报

11

主题

93

帖子

82

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
55
发表于 2022-7-5 19:31:36 | 显示全部楼层
 
Indeed one with color compapy chop with imp and one metric + no logo for others
Also one b/w company chop both metric and imperial+ no logo for others
 
Different flavors can be added also (linetypes and layers)
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-12 14:01 , Processed in 0.398556 second(s), 70 queries .

© 2020-2025 乐筑天下

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