乐筑天下

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

[编程交流] Vba & Attsync

[复制链接]

48

主题

1073

帖子

1043

银币

后起之秀

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

铜币
238
发表于 2022-7-6 12:18:32 | 显示全部楼层 |阅读模式
I am currently writing a VBA routine to update our drawing blanks to incorporate the latest corporate identity. I have managed to get the basic border to update but I am left with needing to move the ATTRIBUTEs. When doing this individually I use the ATTSYNC command but this isn't an available VBA call. Is there a way to call it?
 
In LISP I would use the (command "ATTSYNC"... format but I have never had to do this in VBA.
回复

使用道具 举报

48

主题

1073

帖子

1043

银币

后起之秀

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

铜币
238
发表于 2022-7-6 12:45:39 | 显示全部楼层
answer found!
 
  1. ThisDrawing.SendCommand "ATTSYNC" & vbCr & "n" & vbCr & "ics-rockwell-a1-a" & vbCr
 
had I not asked I'm sure I wouldn't have found it though.
回复

使用道具 举报

1

主题

25

帖子

25

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-6 13:08:30 | 显示全部楼层
Try using Attribute Object, with his methods and properties.
E.G.:
attribute.move point1, point2
 
where attribute is the attribute you want to move, move (obviously) y the metod move, point1 and point2 are points from where you want to move the attribute to...
 
Sorry by my english
回复

使用道具 举报

48

主题

1073

帖子

1043

银币

后起之秀

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

铜币
238
发表于 2022-7-6 13:35:01 | 显示全部楼层
thank you but in this case ATTSYNC is more appropriate.
 
I have a block with attributes defined in the current drawing. I also have a newer drawing block with the same named attributes but they are in a different position. I don't (need to) know the new position of the attributes as they are defined in the new block. The ATTSYNC command moves all the attributes to their new location without extra code.
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-5 06:23 , Processed in 0.402795 second(s), 60 queries .

© 2020-2025 乐筑天下

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