当前使用页面设置中的导入按钮 ;有了这个,我会这样做
- Public Sub CloneSetups()
- Dim pAxDoc As AxDbDocument
- ' Create an instance...
- Set pAxDoc = New AxDbDocument
- ' Load in the drawing containg the layers...
- pAxDoc.Open "p:\acad2k6\satblk\SNA-AZTU-PAGESETUPS.dwg"
-
- ' Delcare an object array to hold the layers...
- Dim pSetToClone() As AcadPlotConfiguration
- Dim i As Integer
- Dim pAxPSet As AcadPlotConfiguration
-
- i = -1
- For Each pAxPSet In pAxDoc.PlotConfigurations
- i = i + 1
- ReDim Preserve pSetToClone(i)
- Set pSetToClone(i) = pAxPSet
- Next
-
- ' Clone 'em!
- pAxDoc.CopyObjects pSetToClone, ThisDrawing.PlotConfigurations
-
- ' Clean up
- Set pAxDoc = Nothing
- End Sub
显然,上述内容是对格伦'的快速编辑;s sub进行测试,看看它是否可以工作,它确实可以 ;我可能会重新命名一些东西,以符合我的惯例,但它35;039;s杰出。 |