Author Topic: Accessing visible entities in a dynamic block  (Read 5354 times)

0 Members and 1 Guest are viewing this topic.

Rabbit

  • Guest
Accessing visible entities in a dynamic block
« on: November 06, 2012, 04:37:25 PM »
I have dynamic blocks with nested blocks that have tag numbers.  In my code I plan on looking at the block to see if there are visibility states.  If it does, then I want to go into the block to find out which nested blocks are visible and extract the attribute information.  Thanks to LeeMac, I'm able to get a list of all of the blocks with tags using the following code:

Code: [Select]
;;;------------------------------------------------------------------------------------------------
;;;Get a list of named blocks with other blocks.
;;;Thanks to Lee Mac ( http://www.lee-mac.com/ ) for his help in creating this routine.
(defun _listofblockswithnestedblock ( nested / lst name )
  (vlax-for block (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)));for each block in drawing do the code
    (if;if block is in layout, is xref and if is anonymous, skip to next block
      (and
(= :vlax-false (vla-get-islayout block))
        (= :vlax-false (vla-get-isxref block))
        (not (wcmatch (setq name (vla-get-name block)) "`**"))
      )
      (vlax-for obj block;for all other blocks, do code
(if
  (and
    (= "AcDbBlockReference" (vla-get-objectname obj))
            (or
      (and
(vlax-property-available-p obj 'effectivename)
                (= (strcase nested) (strcase (vla-get-effectivename obj)))
              );and
      (= (strcase nested) (strcase (vla-get-name obj)))
            );or
    (not (member name lst))
          );and
  (setq lst (cons (cdar (ATT:GETS (vlax-vla-object->ename obj))) lst))
        );if
      );vlax-for
    );if
  );vlax-for
  lst
);defun

Then I use this to put the tags into dotted pairs (<tagname> . <# of tags>):
Code: [Select]
(defun ListCount  (lst / tlst rlst)
  (foreach i  lst
    (setq rlst
    (if (setq tlst (assoc i rlst))
      (subst (cons i (1+ (cdr tlst))) tlst rlst)
      (cons (cons i 1) rlst)
      )
   )
    )
  (vl-sort
   rlst
   '(lambda (x y)
      (< (car x) (car y))))
  )

I've found this web page and tried to adapt it to Lisp with no avail: http://adndevblog.typepad.com/autocad/2012/05/accessing-visible-entities-in-a-dynamic-block.html?cid=6a0167607c2431970b0167689ba58c970b

If I understand it right, I need to get the group code 303 of the block and then iterate through that making a list of the entities it finds there.  But since I don't speak the programming language shown in the example, I can't make sense of it.

All help is greatly appreciated,
Rabbit

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: Accessing visible entities in a dynamic block
« Reply #1 on: November 07, 2012, 04:46:32 AM »
You want the block definition. A Dynamic Block has 2 definitions, the original and the temporary anonymous. The original one is what you created and/or edited inside BEdit. The anonymous one is the version shown after parameters have changed from default.
 
The anonymous block name can be found in the code 2 of the insert item (the placed block reference). From that you should be able to get at the definition of that block through the tblsearch or tblobjname functions. From that you eathe use the -2 code or the entnext respectively to get at the entities inside the block definition.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Rabbit

  • Guest
Re: Accessing visible entities in a dynamic block
« Reply #2 on: November 08, 2012, 09:09:11 AM »
Thanks for the explanation irneb.  It's some good learning.

Here's what I've got so far, and it's not working.  I'm having trouble with entnext I believe.

As of right now, I'm just trying to a list of the the nested blocks that are visible.  Eventually I'll get a list of the attributes in those blocks.
Code - Auto/Visual Lisp: [Select]
  1. (setq LastBlockEnts (entlast))
  2.   (setq BlockEnts (cdr (assoc -2 (tblsearch "block" (cdr (assoc 2 (entget LastBlockEnts)))))))
  3.   (if (wcmatch (cdr (assoc 2 (entget (entlast)))) "`**")
  4.     (while (= (cdr (assoc 0 (setq BlockEnts (entget (entnext BlockEnts))))) "INSERT")
  5.       (setq test (cons (cdr (assoc 2 BlockEnts)) Test))
  6.     );wile
  7.   );if
  8.  
  9.  

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Accessing visible entities in a dynamic block
« Reply #3 on: November 08, 2012, 09:22:13 AM »
The following code is untested, but should point you in the right direction:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:test ( / el en lst )
  2.     (if
  3.         (and
  4.             (setq en (car (entsel "\nSelect Block: ")))
  5.             (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  6.         )
  7.         (progn
  8.             (setq en (tblobjname "BLOCK" (cdr (assoc 2 el))))
  9.             (while (setq en (entnext en))
  10.                 (if
  11.                     (and
  12.                         (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  13.                         (/= 1 (cdr (assoc 60 el)))
  14.                     )
  15.                     (setq lst (cons (cdr (assoc 2 el)) lst))
  16.                 )
  17.             )
  18.             (print (vl-sort lst '<))
  19.         )
  20.     )
  21.     (princ)
  22. )

Rabbit

  • Guest
Re: Accessing visible entities in a dynamic block
« Reply #4 on: November 08, 2012, 12:05:44 PM »
I have to say, I really love deconstructing the examples people share with me.  I had a good ol' light bulb moment looking through this stuff.

You guys are the best.

Rabbit

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Accessing visible entities in a dynamic block
« Reply #5 on: November 08, 2012, 12:18:26 PM »
Good stuff Rabbit, I like your enthusiasm towards learning  :-)

Rabbit

  • Guest
Re: Accessing visible entities in a dynamic block
« Reply #6 on: November 08, 2012, 07:51:20 PM »
It works great now, with one exception.  I've come across a situation where I have a parent block.  Inside that I have another equipment block.  Inside of that is the tag block that I need to access.  The routine I wrote will access the first nested block, the equipment block.  I won't drill down deep enough to retrieve the tag attribute.  I've tried several times to get it to work.  The tag it's access is from block "ERINTAG" (oval tag).  I will eventually adapt this part to do the same for the "PRINTAG".

Here's my code:

Code - Auto/Visual Lisp: [Select]
  1. ;;;------------------------------------------------------------------------------------------------
  2. ;;;Get a list of named blocks with other blocks.
  3. ;;;Thanks to Lee Mac ( http://www.lee-mac.com/ ) and irneb for his help in creating this routine.
  4. (defun GetVisibleBlockTags (en BlockName / el en lst TagAtts)
  5.   (if
  6.     (and
  7.       en
  8.       (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  9.     );and
  10.     (progn
  11.       (setq en (tblobjname "BLOCK" (cdr (assoc 2 el))))
  12.         (while (setq en (entnext en))
  13.           (if
  14.             (and
  15.               (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  16.               (= BlockName (cdr (assoc 2 el)))
  17.               (/= 1 (cdr (assoc 60 el)))
  18.             );and
  19.             (progn
  20.               (setq TagAtts (cdar (ATT:GETS en)))
  21.               (cond
  22.                 ((< (strlen TagAtts) 5) (setq TagAtts (strcat "00" TagAtts)))
  23.                 ((< (strlen TagAtts) 6) (setq TagAtts (strcat "0" TagAtts)))
  24.               );cond
  25.               (setq lst (cons (list TagAtts (cdadr (ATT:GETS en))) lst))
  26.             );progn
  27.           );if
  28.         );while
  29.         (vl-sort
  30.           lst
  31.           '(lambda (x y)
  32.              (< (car x) (car y))))
  33.     );progn
  34.   );if
  35.   lst
  36. );defun
  37.  

Called from this:

Code - Auto/Visual Lisp: [Select]
  1. (setq Allblocks nil)
  2.   (setq AllDwgBlocks (ssget "_X"))
  3.   (repeat (setq i (sslength AllDwgBlocks))
  4.     (setq Allblocks (append (GetVisibleBlockTags (ssname AllDwgBlocks (setq i (1- i))) "ERINTAG") Allblocks))
  5.   );repeat
  6.  

I've attached a test file which I have been working on.  The block on the left is the problem one.  The one on the right works fine.  The two tags in the middle are used to represent when there is a tag only, without a parent block.

Also Lee, I've tried to get the other tag finder routine you showed me to work.  Your genius is above mine.  I have trouble following what's happening.  But, It does work for finding the "EQPMTAG" (rectangular tag)

Here's what I came up with on that one:

Code - Auto/Visual Lisp: [Select]
  1. ;;;------------------------------------------------------------------------------------------------
  2. ;;;Get a list of named blocks with other blocks.
  3. ;;;Thanks to Lee Mac ( http://www.lee-mac.com/ ) for his help in creating this routine.
  4. (defun _listofblockswithnestedblock ( nested / lst name )
  5.   (vlax-for block (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)));for each block in drawing do the code
  6.     (if;if block is in layout, is xref and if is anonymous, skip to next block
  7.       (and
  8.         (= :vlax-false (vla-get-islayout block))
  9.         (= :vlax-false (vla-get-isxref block))
  10.         (not (wcmatch (setq name (vla-get-name block)) "`**"))
  11.       )
  12.       (vlax-for obj block;for all other blocks, do code
  13.         (if
  14.           (and
  15.             (= "AcDbBlockReference" (vla-get-objectname obj))
  16.             (or
  17.               (and
  18.                 (vlax-property-available-p obj 'effectivename)
  19.                 (= (strcase nested) (strcase (vla-get-effectivename obj)))
  20.               );and
  21.               (= (strcase nested) (strcase (vla-get-name obj)))
  22.             );or
  23.             (not (member name lst))
  24.           );and
  25. ;;;          (setq lst (cons name lst))
  26. ;;;       (setq lst (cons (vlax-vla-object->ename obj) lst))
  27. ;;;       (setq lst (cons (ATT:GETS (vlax-vla-object->ename obj)) lst))
  28. ;;;       (setq lst (cons (car (ATT:GETS (vlax-vla-object->ename obj))) lst))
  29.           (setq lst (cons (cdar (ATT:GETS (vlax-vla-object->ename obj))) lst))
  30.         );if
  31.       );vlax-for
  32.     );if
  33.   );vlax-for
  34.   lst
  35. );defun
  36.  

And it's called using this:

Code - Auto/Visual Lisp: [Select]
  1. (setq Allblocks (vl-remove "(0 90)" (_listofblockswithnestedblock "EQPMTAG")))
  2.   (setq Allblocks (append (LM:ss->ent (ssget "_X" '((2 . "EQPMTAG")))) Allblocks))
  3.  

Once again, the help and knowledge are greatly appreciated,
Rabbit

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Accessing visible entities in a dynamic block
« Reply #7 on: November 09, 2012, 06:23:59 AM »
The following example will retrieve all attributes (primary & nested to any level) for a selected block:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:test ( / _getnestedattributes _getattributes al el en )
  2.  
  3.     (defun _getnestedattributes ( bn / al el en )
  4.         (if (setq en (tblobjname "BLOCK" bn))
  5.             (while (setq en (entnext en))
  6.                 (if (and
  7.                         (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  8.                         (/= 1 (cdr (assoc 60 el)))
  9.                     )
  10.                     (if (= 1 (cdr (assoc 66 el)))
  11.                         (setq al (append al (_getattributes en) (_getnestedattributes (cdr (assoc 2 el)))))
  12.                         (setq al (append al (_getnestedattributes (cdr (assoc 2 el)))))
  13.                     )
  14.                 )
  15.             )
  16.         )
  17.         al
  18.     )
  19.  
  20.     (defun _getattributes ( en / al el )
  21.         (setq en (entnext en)
  22.               el (entget  en)
  23.         )
  24.         (while (= "ATTRIB" (cdr (assoc 0 el)))
  25.             (setq al (cons (cons (cdr (assoc 2 el)) (cdr (assoc 1 el))) al)
  26.                   en (entnext en)
  27.                   el (entget  en)
  28.             )
  29.         )
  30.         (reverse al)
  31.     )
  32.  
  33.     (if
  34.         (and
  35.             (setq en (car (entsel "\nSelect Block: ")))
  36.             (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  37.         )
  38.         (if (= 1 (cdr (assoc 66 el)))
  39.             (setq al (append (_getattributes en) (_getnestedattributes (cdr (assoc 2 el)))))
  40.             (setq al (_getnestedattributes (cdr (assoc 2 el))))
  41.         )
  42.     )
  43.     (mapcar 'print al)
  44.     (princ)
  45. )

However, if you intend to use the above algorithm in a loop to iterate over all blocks in the drawing, you will need to include a check to determine whether a block reference has already been processed, since there is no need to process the block definition more than once (i.e. avoid processing the block definition of two block references of the same name).

I hope this helps!

Rabbit

  • Guest
Re: Accessing visible entities in a dynamic block
« Reply #8 on: November 09, 2012, 07:08:03 PM »
Well Lee, the last routine you posted helped, but not like you would think.  It helped me figure out your other routine, _listofblockswithnestedblock.

I've adapted it to what I'm trying to do and it works great but I can't figure out how to work around visibility states.  In the attached drawing, I have one block.  That block has it's visibility set so that I can see the two electrical tags "21.09/E1" and "21.09"/E2".  When I run the routine, It picks up all three electrical tags.  I want it to only return the visible tags, in this case "21.09/E1".

The return is a list of tags, ("21.09E3") in this case.  If the visibility state is set to "W/O Chase", then it should return ("21.09E1" "21.09E2").  If there were two of these blocks, and one had the visibility parameters set to "W/O Chase" and the other set to "W/ Chase 9.14", then the list would look like ("21.09E1" "21.09E2" "21.09E3").  If both are set to "W/O Chase", then the list would be ("21.09E1" "21.09E1" "21.09E2" "21.09E2").

Here's the revised routine.  I've added notes along the way:
Code - Text: [Select]
  1. (defun _listofblockswithnestedblock ( nested / lst name )
  2.   (vlax-for block (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)));for each block in drawing do the code
  3.     (if;if block is in layout, is xref and if is not dynamic, skip to next block
  4.       (and
  5.         (= :vlax-false (vla-get-islayout block))
  6.         (= :vlax-false (vla-get-isxref block))
  7.         (not (wcmatch (setq name (vla-get-name block)) "`**"))
  8.       )
  9.       (vlax-for obj block;for all other blocks, do code
  10.         (if
  11.           (and
  12.             (= "AcDbBlockReference" (vla-get-objectname obj))
  13.             (or
  14.               (and
  15.                 (vlax-property-available-p obj 'effectivename)
  16.                 (= (strcase nested) (strcase (vla-get-effectivename obj)))
  17.               );and
  18.               (= (strcase nested) (strcase (vla-get-name obj)))
  19.             );or
  20.             (not (member name lst))
  21.           );and
  22.           (progn
  23.             (if (= nested "EQPMTAG")
  24.               (setq TagAtts (cdar (ATT:GETS (vlax-vla-object->ename obj)))); this is for when the routine finds "EQPMTAG" blocks
  25.               (progn; this is for when the routine finds "ERINTAG" blocks
  26. ;;;At this point, I'm not sure if the block needs to be checked to see if it even has a visibility parameter, then if it does, do code.  If not, do different code.
  27. ;;;There are times where the routine will be used on blocks that do not have visibility parameters.
  28.                 (setq 1stAtt (cdar (ATT:GETS (vlax-vla-object->ename obj))))
  29.                 (setq TagAtts (strcat
  30.                                 (cond; this section just puts the number attributes to 4 digits dot two digits, i.e. change 00.00 & 000.00 to 0000.00
  31.                                   ((< (strlen 1stAtt) 5) (setq 1stAtt (strcat "00" 1stAtt)))
  32.                                   ((< (strlen 1stAtt) 6) (setq 1stAtt (strcat "0" 1stAtt)))
  33.                                 );cond
  34.                                 (cdadr (ATT:GETS (vlax-vla-object->ename obj)))
  35.                                );strcat
  36.                 );setq
  37.               );progn
  38.             );if
  39.             (setq lst (cons TagAtts lst))
  40.           );progn
  41.         );if
  42.       );vlax-for
  43.     );if
  44.   );vlax-for
  45.   lst
  46. );defun
  47.  

Here's how it's called:

Code - Auto/Visual Lisp: [Select]
  1. (setq Allblocks (vl-remove "(0 90)" (_listofblockswithnestedblock "ERINTAG"))); changing "ERINTAG" to "EQPMTAG" looks for equipment tags
  2.  

And here is the subroutine to get the attributes:

Code - Auto/Visual Lisp: [Select]
  1. ;;;------------------------------------------------------------------------------------------------
  2. ;;;Thanks to J. Roper for this section:
  3. ;;---------------------------------------------------------
  4. ;ATT:GETS - Utility routine to get all attributes for
  5. ;an insert object (EN).
  6. ;;
  7. ;;You pass this function an entity name, like something that would be returned from this example:
  8. ;;(setq EN (car (entsel "\nSelect block")))
  9. ;;an entity name looks like this when returned on a command line  --><Entity name: 4119ab90>
  10. ;;You use this function like this:  (setq ATTLIST (ATT:GETS EN))
  11. ;;it returns a list like this ---> (("TAG1 . "VALUE1")("TAG2" . "VALUE2")....)
  12. (defun ATT:GETS (EN / EL RES)
  13.   ;entnext goes on to the next entity.  If what you passed is an attributed block, the next entity will be an attribute.
  14.   (setq EN (entnext EN)
  15.         EL (entget EN));entget "breaks open" the entity name to reveal the entity list
  16.   (while (= "ATTRIB" (cdr (assoc 0 EL)));we check the entity list to see if it is an attribute
  17.     (setq RES (cons
  18.                 (cons (cdr (assoc 2 EL));if it is, we create a list of its tag and value, dxf code 2 and 1, using CONS
  19.                       (cdr (assoc 1 EL))) RES)
  20.           EN (entnext EN);go to the next entity
  21.           EL (entget EN)));get the next entities list
  22.   (reverse RES);reverse the list to put it in proper order.
  23.   )
  24.  

I hope I have provided enough info on what I'm trying to achieve.  If you have any questions, don't hesitate to ask.

And as always, I really appreciate your help.  It has been invaluable.
Rabbit

Rabbit

  • Guest
Re: Accessing visible entities in a dynamic block
« Reply #9 on: November 13, 2012, 12:46:39 PM »
I'm stuck on this, can anyone help?

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Accessing visible entities in a dynamic block
« Reply #10 on: November 13, 2012, 01:20:17 PM »
I'm stuck on this, can anyone help?

I thought I had provided the solution in Reply#7:?

Rabbit

  • Guest
Re: Accessing visible entities in a dynamic block
« Reply #11 on: November 13, 2012, 02:25:19 PM »
Reply #7 I was able to craft into a routine that works exceptionally well, but it doesn't work if the tags are nested 2 or mores times deep within the block.

Even though it's ugly, it works: (At a later date, I'll have to re-write it again to clean it up.)
Code - Auto/Visual Lisp: [Select]
  1. (defun FINDNESTEDTAGS (nested RinCode)
  2.   (setq ss (ssget "_X" '((0 . "INSERT")))
  3.         lst nil
  4.         TagAtts nil
  5.         lst nil)
  6.   (repeat (setq i (sslength ss))
  7.     (setq en (ssname ss (setq i (1- i))))
  8.     (if (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  9.       (if (= "EQPMTAG" (cdr (assoc 2 el)))
  10.         (if (/= 0 RinCode)
  11.           (progn
  12.             (setq TagAtts (cdar (ATT:GETS en)))
  13.             (setq lst (cons TagAtts lst))
  14.           );progn
  15.         );if
  16.         (progn
  17.           (if (and
  18.                 (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  19.                 (= nested (cdr (assoc 2 el)))
  20.               );and
  21.             (progn
  22.               (setq 1stAtt (cdar (ATT:GETS en)))
  23.                 (setq TagAtts (strcat
  24.                                 (cond; this section just puts the number attributes to 3 digits dot two digits, i.e. change 0.00 & 00.00 to 000.00
  25.                                   ((< (strlen 1stAtt) 5) (setq 1stAtt (strcat "00" 1stAtt)))
  26.                                   ((< (strlen 1stAtt) 6) (setq 1stAtt (strcat "0" 1stAtt)))
  27.                                   (T 1stAtt)
  28.                                 );cond
  29.                                 (cdadr (ATT:GETS en))
  30.                               );strcat
  31.                 );setq
  32.                 (setq lst (cons TagAtts lst))
  33.               );progn
  34.             (progn
  35.               (setq en (tblobjname "BLOCK" (cdr (assoc 2 el))))
  36.               (while (setq en (entnext en))
  37.                 (if
  38.                   (and
  39.                     (= "INSERT" (cdr (assoc 0 (setq el (entget en)))))
  40.                     (= nested (cdr (assoc 2 el)))
  41.                     (/= 1 (cdr (assoc 60 el)))
  42.                   );and
  43.                   (progn
  44.                     (if (= "EQPMTAG" (cdr (assoc 2 el)))
  45.                       (progn
  46.                         (setq TagAtts (cdar (ATT:GETS en)))
  47.                         (setq lst (cons TagAtts lst))
  48.                       );progn
  49.                       (progn
  50.                         (setq 1stAtt (cdar (ATT:GETS en)))
  51.                         (setq TagAtts (strcat
  52.                                         (cond; this section just puts the number attributes to 3 digits dot two digits, i.e. change 0.00 & 00.00 to 000.00
  53.                                           ((< (strlen 1stAtt) 5) (setq 1stAtt (strcat "00" 1stAtt)))
  54.                                           ((< (strlen 1stAtt) 6) (setq 1stAtt (strcat "0" 1stAtt)))
  55.                                           (T 1stAtt)
  56.                                         );cond
  57.                                         (cdadr (ATT:GETS en))
  58.                                       );strcat
  59.                         );setq
  60.                         (if (/= 0 RinCode) (setq lst (cons TagAtts lst)))
  61.                       );progn
  62.                     );if
  63.                     (if (/= 1 RinCode) (setq lst (cons TagAtts lst)))
  64.                   );progn
  65.                 );if
  66.               );while
  67.             );progn
  68.           );if
  69.         );progn
  70.       );if
  71.     );if
  72.   );repeat
  73.   lst
  74. )
  75.  

Called using:
Code - Auto/Visual Lisp: [Select]
  1. (setq Allblocks (vl-remove "(0 90)" (FINDNESTEDTAGS "EQPMTAG" 1)))
  2.  


The one I posted in reply #8 also works exceptionally well, but it won't separate out the tags that are set to be invisible by the visibility parameter within the block.

I've attached another cad file showing the various types of blocks I'm dealing with.  block "28_15" is a block that has a block named "28.15" inside of it.  Within "28.15" is the blocks that have the tags.  I didn't set these up this way and I wish they had never been set up that way, but it's what I have to work with.

The other block, "21.09" has visibility parameters.  When you open up the file, the visibility parameter is set to have tag "21.09/E3" hidden.

When I run routine from reply #8, it picks up the invisible tag.  When I run routine from reply #7, it doesn't pick up the tags from block "28_15"'s block "28.15".

I've re-written each of these from scratch several times and each time I get the same results.  I'm don't know if it's something I'm missing, or, it's something beyond my knowledge.  I simply can't seem to figure it out.

Maybe here's another way of looking at it;
In the routine _listofblockswithnestedblock, after this (if (= nested "EQPMTAG") on line 23, how would I filter out the tags that are not visible?
In the routine FINDNESTEDTAGS, how would I either change  (setq ss (ssget "_X" '((0 . "INSERT"))) on line 22, to something that selects all blocks in the database, similar to (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)), or, through lines 34-67 go deeper into the block to find the tags.


One last thing, by changing the equipment tag name from "ERINTAG" to "EQPMTAG", these routine work for either type.  Bonus!

I hope I'm not being a PITA.  I truely appreciate everything you've done for me.
Rabbit

Rabbit

  • Guest
Re: Accessing visible entities in a dynamic block
« Reply #12 on: November 13, 2012, 02:40:03 PM »
OOPS

Edit:  Also, with the above routine, the variable "RinCode" is 1 for "EQPMTAGS" and anything else for other types of tags.