application name

Discussion in 'AutoCAD' started by mark, Jul 9, 2004.

  1. mark

    mark Guest

    hi,

    any samples of how to add an application
    name to a block?
    i am trying to mark all the blocks created
    by my application, is there a way to add
    it to the header of the block definition?
    (tblsearch "BLOCK" blockname), in
    other words, how to modify the group code 4
    in the block definition.

    TIA
     
    mark, Jul 9, 2004
    #1
  2. mark

    gert Guest

    (setq ss (ssget "_x" '((0 . "INSERT") (2 . "YOURBLOCKNAME")))
    to get all your created blocks, then you will have to use entmod entupd
    to modify group codes...

    hope it helps you

    mfg
    gert
     
    gert, Jul 9, 2004
    #2
  3. mark

    mark Guest

    sorry, that does not help at all,
    i am talking about blocks, not inserts,
    (tblsearch "block" "xx") will return something like
    ((0 . "BLOCK") (2 . "XX") (70 . 0) (4 . "") (10 0.0 0.0 0.0)
    i am trying to populate the group code 4, which is the description

    thanks
     
    mark, Jul 9, 2004
    #3
  4. Mark,

    I think that you can add the description by redefing the block definition with entmake -

    (entmake '((0 . "BLOCK") (2 . "YOURBLOCKNAME") (70 . 2) (4 . "Your application info") (10 0.0 0.0 0.0))) - (note- this is for a block def with attributes)
    (entmake ... - iterate through each block entitiy)
    (entmake '((0 . "ENDBLK")))

    Peter

    Peter
     
    petersciganek, Jul 9, 2004
    #4
  5. mark

    mark Guest

    peter,
    i thought there should have been a simpler entmod approach,
    but your approach makes sense,
    i will give it a shot
    thanks
    mark

    application info") (10 0.0 0.0 0.0))) - (note- this is for a block def with
    attributes)
     
    mark, Jul 9, 2004
    #5
  6. mark

    mark Guest

    thanks again, works as expected

    application info") (10 0.0 0.0 0.0))) - (note- this is for a block def with
    attributes)
     
    mark, Jul 9, 2004
    #6
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.