I'm having trouble with setting the text location of a dimension using lisp. While the routine cycles through, the Block inserts and shows up, but, the dimensions don't show up right away. When I use vla-put-textposition to set the position, I'm using (entlast) to get the continued dimension. (entlast) returns the block and not the 1st dimension. I think it has something to do with the dimension not immediately showing up in the drawing. I've added (command "regen") in between the call for dimcontinue and vla-put-textposition, which does not solve the problem.
(command "-insert" "BLOCKNAME" "non" pnt1
1 1 0.0)
;First point of dim is at a given point.
;Second point of dim is from insertion point of Block, go up 6" and to the left 1".
;The last point places the dimension at 36" below the insertion point of the block.
;Continue dimension to the right of last point of previous dimension by 2".
;The insertion point of the continued dimension is from insertion point of Block, go up 6" and to the right 1".
;Put 2" dimension text in a place that is easier to read.
;The text is moved to a point that is 36" down and 6" to the right of the Block's insertion point.
I also tried using the following to create the 2nd dimension, but I need the dimension to be associative to the block. Hence the calls to "end" in my command sequence in the code above. I'd rather use the code above for this reason, but, if there is a way using the code below, and keep the dimensions associative, I'm open to that also. Of course, I still have the problem with (entlast).