This issue has risen to the top of my task list again. The reset block suggestion that I thought worked, did not work. Regen is too easy for this. And while I super appreciate the suggestions about updates and versions, I can assure you this has been ongoing for many years. Most of my coworkers are on 2018 (the issue predates that), a small handful is on 2019, I'm currently running 2020 and will be downloading the 2021 release soon. It's across the board. I also appreciate and understand the questions about templates or clean drawings - I've been working the past 6 months to make sure all my stuff is stand-alone and that I don't have hidden/forgotten routines anywhere. I've installed it on machines that have never met me, so to speak. The attached screencast is done on a clean drawing after having just done a reset.
To help you recreate the problem so that you can see it on your own screen, I've cut out a small snippet of my code and made it independent. I'm going to attach a different block here. The code asks for the location on your machine and then inserts it 3 times. The code does some customization, setting a lookup table value and populates a few attributes. And I'm going to attach another screencast. SUPER weird behavior - I didn't even know it was doing. The third block behaves differently than the first 2. I'm assuming you know AutoLISP - you can see you type "dropin" to run it.
Oh- I almost forgot. We read a post on a forum yesterday that basically said "You can't use basepoint parameters in dynamic blocks. They're broken, they don't work." We looked and found that I had them in the affected blocks, so I was super excited and took them out last evening and today. Didn't help. I thought it did, but then ran through the whole program and no good. I keep focusing on the block, but for all I know you're going to look at this code and say "you can't do THAT!!!" That's half of why I cut this snippet out for you, and the other half is to make sure you can reproduce the error. It worked for me too, if all I did was use the manual insert command. It has to be through the program. So I'm please I can reproduce it with this code. You should be able to as well. Right?
(DEFUN c:dropin (/ A BLOCKNAME I# INDEX
OCA OCN PT S# T1 TEXT TOTMODS
VOBJECT X
)
(vl-load-com)
(setq oca '((18 18 18 18) (18 18 18 18 19) (17 17 17 17))
INDEX 1
T1 NIL
pt '(0 0)
BLOCKNAME (getfiled "Select Block" "" "dwg" 16)
oca '((19 19 19 19) (18 18 18 18) (19 19 18 18))
ocn '((1) (2) (3))
) ;SETQ
(FOREACH A OCA
(SETQ vobject
(vla-insertblock
(vlax-get-property
(vla-get-activedocument (vlax-get-acad-object))
'modelspace
)
(vlax-3D-point (trans pt 1 0))
blockname
1.0
1.0
1.0
0.0
)
INDEX 1
text nil
totmods 0
i# (car (nth (vl-position a oca) ocn))
s# 1
) ;setq
(mapcar
'(lambda (x)
(if (= "Lookup1" (vla-get-propertyname x))
(vla-put-value
x
(vlax-make-variant
(length A)
(vlax-variant-type (vla-get-value x))
)
)
)
)
(vlax-invoke vobject 'getdynamicblockproperties)
)
(FOREACH B A
(SETQ TEXT (APPEND TEXT
(LIST (CONS (STRCAT "STRING"
(ITOA (- (length A) 3))
"-"
(ITOA INDEX)
)
(STRCAT "INV"
(if (= (strlen (itoa i#)) 1)
(strcat "0" (itoa i#))
(itoa i#)
)
"-"
"S"
(if (= (strlen (itoa s#)) 1)
(strcat "0" (itoa s#))
(itoa s#)
)
":("
(itoa b)
")"
)
)
)
)
INDEX (1+ INDEX)
totmods (+ totmods b)
s# (1+ s#)
) ;SETQ
) ;FOREACH
(SETQ TEXT (APPEND TEXT
(LIST (CONS "SUB-ARRAY-LINE-1"
(strcat "("
(itoa totmods)
") BOB'S AWESOME MODULES"
)
)
)
)
TEXT (APPEND TEXT
(LIST (CONS "ES#"
(strcat (ITOA (1+ (CADR A)))
)
)
)
)
) ;setq
(mapcar
'(lambda (x)
(if (assoc (vla-get-tagstring x) text)
(vla-put-textstring
x
(cdr (assoc (vla-get-tagstring x) text))
)
)
)
(vlax-invoke vobject 'getattributes)
) ;mapcar
(SETQ PT (POLAR PT (* PI 1.5) 3)
)
)
) ;dropin