我想实现把一个DWG 文件中的所有内容复制到当前DWG 中 BV 怎么写?
- Set doc1 = cadapp.Documents.Open("aa.dwg")
- Set doc2 = cadapp.Documents.Add
- Dim ssetobj1 As AcadSelectionSet
- Set ssetobj1 = doc1.SelectionSets.Add("aa")
-
- ssetobj1.Select acSelectionSetAll
- Dim Enrycount As Integer
- Enrycount = ssetobj1.Count - 1
- ReDim objcollection(0 To Enrycount) As Object
-
- Dim i As Integer
- i = 0
- Dim Ientity As AcadEntity
-
- For Each Ientity In doc1.ModelSpace
-
- Dim obj As Object
- Set obj = Ientity
- Set objcollection(i) = obj
-
- i = i + 1
-
- '
-
-
- Next Ientity
-
- Dim retObjects As Variant
-
-
- retObjects = doc2.CopyObjects(objcollection) ''' 提示错误 对象不在数据中,该如何修改
retObjects = doc2.CopyObjects(objcollection) ''' 提示错误 对象不在数据中,该如何修改
急 !!!!!!!!!!!!!!!!!!!
|