SelSet of nested blocks

Discussion in 'AutoCAD' started by spanqy, Sep 15, 2003.

  1. spanqy

    spanqy Guest

    Is it possible to create a selset of nested blocks?

    The blocks I'm looking for reside in the XRef that is attached to the drawing I am searching in. I've tried this ss filter with no success

    '*********************************************************
    Here's my code:
    intCodes(0) = 0 'entity type
    intCodes(1) = 2 'block name
    intCodes(2) = 8 'layer name

    varCodeValues(0) = "INSERT"
    varCodeValues(1)= "MLL4"
    varCodeValues(2) = "3080PL|AL01"

    'build selset
    Set objSS = ThisDrawing.SelectionSets.Add("GETML")
    objSS.Select acSelectionSetAll, , , intCodes, varCodeValues
     
    spanqy, Sep 15, 2003
    #1
  2. No.
     
    Frank Oquendo, Sep 15, 2003
    #2
  3. spanqy

    spanqy Guest

    Thanks Frank!
     
    spanqy, Sep 16, 2003
    #3
  4. spanqy

    Mark Propst Guest

    oops, sorry about the email reply, i had intended reply to group



     



    sounds like you want to import block definitions found in your xref into the current drawing.



    if that's correct, you can do it with object dbx



     



    'From: Tony Tanzillo ()



    Public Function GetBlockFromDwg(DwgName As String, _
                        BlkName As String, _
                        Target As AcadDocument) As AcadBlock
        On Error GoTo Failed
        Dim DbxDoc As AxDbDocument
        Set DbxDoc = GetInterfaceObject("ObjectDBX.AxDbDocument")
        DbxDoc.Open DwgName
       
        Dim Objects(0 To 0) As AcadObject
        Set Objects(0) = DbxDoc.Blocks(BlkName)
       
       
        DbxDoc.CopyObjects Objects, Target.Blocks
        Set GetBlockFromDwg = Target.Blocks(BlkName)
    Failed:
    End Function



     



     



     




     



    ----- Original Message -----



    From:



    To:



    Sent: Monday, September 15, 2003 5:10 PM



    Subject: Re: SelSet of nested blocks






    I agree Mark.
    So then, is it possible to create a selset of nested blocks?  I'm trying NOT to open the XRef file.

    Thanks for your help

    Mark Sanchez
    SPEC Services, Inc.
     
    Mark Propst, Sep 16, 2003
    #4
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.