Polls

Within the context of its era, which version of AutoCAD was the BUGGIEST?
 

Subscribe

RTEXT confuses VBA PDF Print E-mail
Saturday, 01 April 2006
When using VBA to iterate through entities within any block (including modelspace and paperspace), the first time an RTEXT entity is encountered, an error is produced. Whats worse is that this error cant be trapped with "on error resume next." For example:
Sub RtextError()
  Dim oEnt As AcadEntity
  Dim oBlock As AcadBlock
  For Each oBlock In ThisDrawing.Blocks
    If Not oBlock.IsXRef Then
      For Each oEnt In oBlock
        Debug.Print oEnt.ObjectName ***
     Next oEnt
    End If
  Next oBlock
End Sub

*** when this line encounters an RTEXT entity, the following error occurs: Run-time error -2147221231 ClassFactory cannot supply requested class

Workarounds: None known
First Appeared: AutoCAD 2006
Status as of 2006 SP1: Still evident
Status as of 2007: Fixed. Tough luck, 2006 users.

 
< Prev   Next >

THIS INFORMATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copyright © 2008, http://www.texupport.net/