Detach Xref via ObjectDBX

Discussion in 'AutoCAD' started by Michael, Mar 29, 2005.

  1. Michael

    Michael Guest

    I am trying to detach all xrefs via oDBX?

    I get the error "Method Unload failed" Has anyone been able to do this?




    Code....

    dbxDoc.Open FileStr
    For Each Ent In dbxDoc.ModelSpace
    If TypeOf Ent Is AcadBlockReference Then
    Set BlkRef = Ent
    Set Blk = dbxDoc.Blocks(BlkRef.Name)
    If Blk.IsXRef Then
    Blk.Detach
    End If
    End If
    Next
    dbxDoc.Save
     
    Michael, Mar 29, 2005
    #1
  2. First you must specify what release of AutoCAD you
    are working with.

    AFAIK, there is no Xref functionality in documents
    that are accessed via ObjectDBX.



    I am trying to detach all xrefs via oDBX?

    I get the error "Method Unload failed" Has anyone been able to do this?




    Code....

    dbxDoc.Open FileStr
    For Each Ent In dbxDoc.ModelSpace
    If TypeOf Ent Is AcadBlockReference Then
    Set BlkRef = Ent
    Set Blk = dbxDoc.Blocks(BlkRef.Name)
    If Blk.IsXRef Then
    Blk.Detach
    End If
    End If
    Next
    dbxDoc.Save
     
    Tony Tanzillo, Mar 29, 2005
    #2
  3. Michael

    MP Guest

    nope
    Xrefs not available via oDbx
    check google for confirmation
    :-(

    I am trying to detach all xrefs via oDBX?

    I get the error "Method Unload failed" Has anyone been able to do this?




    Code....

    dbxDoc.Open FileStr
    For Each Ent In dbxDoc.ModelSpace
    If TypeOf Ent Is AcadBlockReference Then
    Set BlkRef = Ent
    Set Blk = dbxDoc.Blocks(BlkRef.Name)
    If Blk.IsXRef Then
    Blk.Detach
    End If
    End If
    Next
    dbxDoc.Save
     
    MP, Mar 29, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.