<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Zoom to selected objects in AutoCAD Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-forum/zoom-to-selected-objects/m-p/942696#M349925</link>
    <description>Hi...&lt;BR /&gt;
&lt;BR /&gt;
I hope that this routine help you...&lt;BR /&gt;
&lt;BR /&gt;
Private Sub ZoomTexto()&lt;BR /&gt;
    Dim sSeleccion As AcadSelectionSet&lt;BR /&gt;
    Dim cSeleccion As AcadSelectionSets&lt;BR /&gt;
    Dim vCodigo As Variant&lt;BR /&gt;
    Dim vEntidad As Variant&lt;BR /&gt;
    Dim codigo(0) As Integer&lt;BR /&gt;
    Dim entidad(0) As Variant&lt;BR /&gt;
    Dim ObjTexto As AcadEntity&lt;BR /&gt;
    Dim n As Integer&lt;BR /&gt;
    n = 1&lt;BR /&gt;
    Dim minP1 As Variant, maxP1 As Variant&lt;BR /&gt;
    Form1.Hide&lt;BR /&gt;
    AppActivate autocadApp.Caption&lt;BR /&gt;
    Set cSeleccion = autocadApp.ActiveDocument.SelectionSets&lt;BR /&gt;
    For Each sSeleccion In cSeleccion&lt;BR /&gt;
        If sSeleccion.Name = "SS" Then&lt;BR /&gt;
            sSeleccion.Delete&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next&lt;BR /&gt;
    Set sSeleccion = cSeleccion.Add("SS")&lt;BR /&gt;
    codigo(0) = 0&lt;BR /&gt;
    entidad(0) = "TEXT,MTEXT"&lt;BR /&gt;
    vCodigo = codigo&lt;BR /&gt;
    vEntidad = entidad&lt;BR /&gt;
    sSeleccion.SelectOnScreen vCodigo, vEntidad&lt;BR /&gt;
    For Each ObjTexto In sSeleccion&lt;BR /&gt;
        ObjTexto.GetBoundingBox minP1, maxP1&lt;BR /&gt;
        autocadApp.ZoomWindow minP1, maxP1&lt;BR /&gt;
        If n &amp;lt; sSeleccion.Count Then&lt;BR /&gt;
            autocadApp.ActiveDocument.Utility.Prompt vbCr &amp;amp; "Zoom a: " &amp;amp; ObjTexto.TextString &amp;amp; vbCr&lt;BR /&gt;
            Else&lt;BR /&gt;
                'Salida limpia&lt;BR /&gt;
                autocadApp.ActiveDocument.Utility.Prompt vbCr &amp;amp; "Zoom a: " &amp;amp; ObjTexto.TextString &amp;amp; vbCrLf&lt;BR /&gt;
                autocadApp.ActiveDocument.SendCommand Chr(3)&lt;BR /&gt;
        End If&lt;BR /&gt;
        n = 1 + n&lt;BR /&gt;
    Next ObjTexto&lt;BR /&gt;
    Form1.Show&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
Un saludo de SpeedCAD... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
CHILE&lt;BR /&gt;
FORO: http://www.hispacad.com/foro</description>
    <pubDate>Sat, 31 Jan 2004 14:32:03 GMT</pubDate>
    <dc:creator>Speed_CAD</dc:creator>
    <dc:date>2004-01-31T14:32:03Z</dc:date>
  </channel>
</rss>

