I did do ZoomExtents. this is original code (sound it familiar to you?
![ROFL](images/smilies/082.gif)
)
[vba]
Dim 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
[/vba]
I Added the following lines instead of the last original sentence
[vba]
Application.ZoomExtents
oSset.Select acSelectionSetAll, , , fType, fData
[/vba]
The selection gets the blocks but in such a way that is different from the original code...