binding multiple xrefs?

Discussion in 'AutoCAD' started by Leonard Johnson, Nov 2, 2004.

  1. How do I bind all xref's in a drawing?
     
    Leonard Johnson, Nov 2, 2004
    #1
  2. Leonard Johnson

    Matt W Guest

    With VBA or in general??
     
    Matt W, Nov 2, 2004
    #2
  3. Leonard Johnson

    John Coon Guest

    Leonard,
    This could be a start

    John Coon

    Private Sub bind()
    Dim blocks As AcadBlocks
    On Error GoTo ERR_Control
    bPrefixName = True
    Set blocks = ThisDrawing.blocks
    For Each Block In blocks
    If Block.IsXRef Then
    On Error GoTo ERR_Control
    Block.bind (bPrefixName)
    End If
    Next

    ERR_Control:
    MsgBox "External Reference Errors were encountered!" & vbCr & _
    "The Bind Macro was unable to bind all Xrefs." & vbCr & _
    "You MUST manually bind the Xrefs, or insert" & vbCr & _
    "them as blocks.", vbCritical, "Alert"
    End Sub
     
    John Coon, Nov 3, 2004
    #3
  4. With VBA

     
    Leonard Johnson, Nov 3, 2004
    #4
  5. It's telling me that variable bPrefixName is not defined.
     
    Leonard Johnson, Nov 3, 2004
    #5
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.