Nested Block, will what I am trying work.

Discussion in 'AutoCAD' started by Rodney Estep, Jul 29, 2004.

  1. Rodney Estep

    Rodney Estep Guest

    Dear All,
    I several titlblocks/sheets that I drive with my software. I have several
    programs that use the titleblocks and do not want to have to edit them.
    What I am wanting to do is have a nested block within wach one of my
    titleblocks with 6 attributes.

    What I am wanting to do is be able to create autolisp routine that will
    allow me the edit the attribute values. I have tryed NENTSEL, and then
    entnext.... and can not seem to get to the nested attributes. Is this even
    possible?
    Block
    att
    att
    att
    att
    Nested block
    att <-- I want to edit this attribute value for example. But
    not change any other insertions of the block?
    att
    att




    Thanks
    Rodney
     
    Rodney Estep, Jul 29, 2004
    #1
  2. This has no error checking and only displays the entities within a single
    nested block
    If blocks were found within the first nested block, the same process would
    have to be performed.
    (defun C:LNB ()
    (setq ES (entsel "\nSelect Block ? "))
    (setq BN (cdr (assoc 2 (entget (car ES)))))
    (setq TS (tblsearch "BLOCK" BN))
    (setq EN (entget (cdr (assoc -2 TS))))
    (while (/= (cdr (assoc 0 EN)) "SEQEND")
    (princ "\nEN=")
    (princ EN)
    (setq EN (entget (entnext (cdr (assoc -1 EN)))))
    )
    (princ)
    )
     
    Alan Henderson @ A'cad Solutions, Jul 29, 2004
    #2
  3. Rodney Estep

    Rodney Estep Guest

    Alan,
    This did not work but I understand what you are getting at. What I was
    trying to do is not possible. If I have to edit the attribute values for
    the nested block in this way than every insertion of this block will have
    the same values. What I was trying to accomplish was having unique values
    for each insertion. Basically attributes for the block that are only
    editable using my program.
    The resaoning for this is, my program i wrote for this company has 10 blocks
    that program uses. Since they are querky about there layouts I nested a
    block into each block that was common to all. If they needed to change the
    layout I only need to change (2) blocks instead of 10 and this works really
    well. Since they have asked me to add more attributes to the blocks for
    something special I wanted to add these attributes the nested block and then
    make a special app to edit these, would have many advantages.
    Oh, well. I will just have to do it the hard way.

    Thanks
    Rodney
     
    Rodney Estep, Jul 31, 2004
    #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.