- 积分
- 744
- 明经币
- 个
- 注册时间
- 2004-7-19
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2004-10-5 14:49:00
|
显示全部楼层
还好,俺的程序就是将一些线粘贴到一张新图中去,用copyObjects简单容易 实现
Dim Doc1 As AcadDocument, Doc2 As Object Dim ssetObj As AcadSelectionSet Dim objCollection() As AcadEntity Set Doc1 = Application.Documents(lst2.List(I))'有多个DXF文件
DeleAllSelect Set ssetObj = ThisDrawing.SelectionSets.Add("ybssa") Set ssetObj = Doc1.ActiveSelectionSet ssetObj.Select acSelectionSetAll
If ssetObj.count > 0 Then ReDim objCollection(ssetObj.count - 1) As AcadEntity For K = 0 To ssetObj.count - 1 Set objCollection(K) = ssetObj(K) Next K
Set Doc2 = Documents("D:\mydwg.DWG") Doc1.CopyObjects objCollection, Doc2.ModelSpace End If ThisDrawing.Application.Documents(lst2.List(I)).Close , False ThisDrawing.Application.ZoomExtents
|
|