I did do ZoomExtents. this is original code (sound it familiar to you?)
I Added the following lines instead of the last original sentenceDim fType(1) As Integer Dim fData(1) As Variant fType(0) = 0: fType(1) = 2 fData(0) = "INSERT": fData(1) = "Etichetta Locale" '' <-- change blockname here For Each oSset In ThisDrawing.SelectionSets If oSset.Name = "$Blocks$" Then oSset.Delete Exit For End If Next oSset Set oSset = ThisDrawing.SelectionSets.Add("$Blocks$") '' <-- any name is admissible On Error GoTo 0 oSset.SelectOnScreen fType, fData
The selection gets the blocks but in such a way that is different from the original code...Application.ZoomExtents oSset.Select acSelectionSetAll, , , fType, fData




)
Reply With Quote