Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > IntelliCAD software > VBA, HandleToOb...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 317 of 360
Post > Topic >>

VBA, HandleToObject and handles of deleted entities.

by ErPotenza <no.mail@[EMAIL PROTECTED] > Feb 13, 2007 at 09:36 AM

I'm doing some tests with VBA and I'm having a problem:

    Public Sub Test()
        Dim p1 As Point
        Set p1 = Library.CreatePoint(0, 0, 0)
        Dim p2 As Point
        Set p2 = Library.CreatePoint(50, 50, 0)
        Dim l As Line
        Set l = ThisDocument.ModelSpace.AddLine(p1, p2)

        Dim h As String
        h = l.Handle

        l.Delete

        Dim o As Object
        Set o = ThisDocument.HandleToObject(h)
    End Sub

On the last line of the Sub,

    Set o = ThisDocument.HandleToObject(h)

h is the handle of a deleted line, but HandleToObject returns the line
without a problem. In Autocad a similar situation would raise an
exeption. Is it possible to know when, given a handle, the respective
entity exists or not?

Thanks




 2 Posts in Topic:
VBA, HandleToObject and handles of deleted entities.
ErPotenza <no.mail@[EM  2007-02-13 09:36:44 
Re: VBA, HandleToObject and handles of deleted entities.
"Huib" <huib  2007-02-17 16:57:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 4 21:23:26 CDT 2008.