I have to select all enties in a drawing and paste my selection in a second drawing.
Presently, I found a way to make it, but on a big drawing it's extremely long to execute. There is a faster way to make a cut / paste of a entire drawing in a second..
Dim ssp As AcadSelectionSet Set ssp = ThisDrawing.SelectionSets.Add("TEST_SSET") ssp.Select acSelectionSetAll If ssp.Count = 0 Then Exit Sub Dim DOC1 As AcadDocument Set DOC1 = Documents.Add Dim objCollection() As Object Dim intCount As Integer intCount = ssp.Count - 1 ReDim objCollection(intCount) For i = 0 To intCount Set objCollection(i) = ssp.ITEM(i) Next CurrDoc.CopyObjects objCollection, DOC1.ModelSpace
If everything from CurrDoc’s ModelSpace requires copying, would a DOC1.ModelSpace.InsertBlock(…) work?
I’m not sure it would be much faster, necessarily, as the InsertBlock call probably uses a similar method as you've demonstrated. Native code, though, is considerably faster than ActiveX.
If you are indeed copying and pasting everything....and I mean everything, then why not just open the drawing and rename it with a new name. In fact you wouldn't even have to open it. You could also use BIGAL's concept that is to insert the drawing then you could use a different location in the model for the insertion point. I don't mean to over simplify this but if you are wanting everything then why do it piece-meal?