Insert in PaperSpace

Discussion in 'AutoCAD' started by Ursus Uziemblo, Feb 4, 2005.

  1. Hi to all,
    I'm trying to access INSERT witch is in PaperSpace
    ThisDrawing.PaperSpace.Item(4#)
    returns insert I need but how to find it thru Name
    ThisDrawing.PaperSpace.Item("block_name")
    does now work
    Any help??
    Thanks
    Ursus Uziemblo
     
    Ursus Uziemblo, Feb 4, 2005
    #1
  2. Thanks Matt,
    your code works ok if You wish to stop and pick a Point
    but in my case I try to find INSERT by its name
    next part will went thru all Layouts to find INSERTS of
    the same block
    Ursus
     
    Ursus Uziemblo, Feb 4, 2005
    #2
  3. Ursus Uziemblo

    Matt W Guest

    Sorry 'bout that. I read your post too fast apparently.
    What do you want to do with the blocks once you find all references of a
    block?
     
    Matt W, Feb 4, 2005
    #3
  4. Hi Matt,
    after redefining a block with attributes
    geometry of block is redefined but position of attributes
    is unchanged. I have to go thru all INSERTS and reposition
    one attribute. From lisp I did it, now a new learning curve - VBA.
    In this area I'm a beginer
    Ursus Uziemblo
     
    Ursus Uziemblo, Feb 4, 2005
    #4
  5. Ursus Uziemblo

    Matt W Guest

    How are you redefining your block??
    Are you using REFEDIT??
    If not, you may want to take a look at that. It's a standard ACAD command.
     
    Matt W, Feb 4, 2005
    #5
  6. Matt,
    all is for running script on ~200 drawings (6-10 layouts each)
    block is redefinded in InsertBlock Method on TihisDrawing.Blocks
    then code have to find all instances of it, select attribute with specific
    TAG,
    and finaly Move methode will move positions of thosw arrtibutes
    uu
     
    Ursus Uziemblo, Feb 4, 2005
    #6
  7. I use this function to delete blocks
    by name...
    gl
    Paul

    '***Start Code
    Public Function fDeleteBlocks(sBlockName As String)
    Dim ssGen As AcadSelectionSet
    Dim vGPCode(1) As Integer
    Dim vDataValue(1), vGroupCode, vDataCode

    vGPCode(0) = 0
    vGPCode(1) = 2
    vDataValue(0) = "Insert"
    vDataValue(1) = sBlockName

    On Error Resume Next

    With ThisDrawing
    .SelectionSets("ZBLOCKS").Delete

    Set ssGen = .SelectionSets.Add("ZBLOCKS")

    vGroupCode = vGPCode
    vDataCode = vDataValue

    ssGen.Select acSelectionSetAll, , , _
    vGroupCode, vDataCode

    ssGen.Erase
    .SelectionSets("ZBLOCKS").Delete


    On Error GoTo 0
    End With
    End Function

    '***End Code
     
    Paul Richardson, Feb 5, 2005
    #7
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.