Attribute Order Causing ENTMAKE troubles...

I've gone with the ENTMAKE to process my block and attributes. All is
well, except for one problem that is killing the whole app. On to the
I'm giving the user alot of flexibility for annotation by using
attributes within blocks. One of the items being listed potentiall
requires multiple copies for that attribute, which I've accomplished, no
problem. The problem is that each attribute below that one, then needs
shifted to accomodate the extra attribute(s), which again, wasn't too
hard to do, with this exception: They are not being processed in order.
The attribute requiring multiple copies is being processed last, so
the others aren't being shifted. They have to be processed in the order
that they are selected when creating the block, which isn't happening.
As always, any thoughts appreciated.
FWIW-I went with blocks to simplify the settings. It's an easy way to
allow the user to determine layer, color, style, position, etc., without
making them go through all the settings and hope it comes out how they
want it to.
Reply to
Loading thread data ...
In case anyone was curious about the solution to this post:
I wrote a routine prompting the user for insertion point and objects for the 'annotation block'. Then it goes through the selection set, with entmake calls for each. It passed initial testing with flying colors, so that seems to be the trick.
The code:
(defun C:DAB ( / ipt sset esl cnt ) (initget 1) (setq ipt (getpoint "\nInsertion base point: ")) (princ "\nSelect attributes in order!") (while (setq esl (entsel)) (if (not sset) (setq sset (ssadd)) ) (setq sset (ssadd (car esl) sset)) );while (if (> (sslength sset) 0) (progn (setq cnt 0) (entmake (list '(0 . "BLOCK") '(2 . "pfx_ann_promh2") '(70 . 2) (cons 10 ipt) );list );entmake - BLOCK (while (< cnt (sslength sset)) (entmake (entget (ssname sset cnt))) (setq cnt (1+ cnt)) );while (entmake '((0 . "ENDBLK")) ) );progn );if (princ) );defun
Reply to

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.