
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I asked about this in a previous thread but I figured I should make a new topic so the answer is easier for others to find.
I am working on a pair of routines that basically take coordinates and rotation from a block and saves those globally, where the other routine can access those in another drawing and based on the name use those values to create a viewport looking at the location of the corresponding block.
The issue I'm currently having is that vl-bb-set doesn't seem to work with the function I use to define the variable name. I was wondering if it's possible to have the variable name for vl-bb-set to be based on the evaluation of the strcat. If not, if there is some kind of clever workaround to get it to work.
To explain the goal result further, the intent is for this to create 3 global variables each loop, xx1 yy1 and r1 on the first loop, xx2 yy2 r2 2nd loop etc.
Any help is appreciated, thanks.
(vl-load-com) (defun C:VPP (/ sx xv yv vv vvl) (setq sx 0) (while (setq vv (car (entsel))) (setq sx (1+ sx)) (setq vvl (entget vv)) (setq xv (rtos (car (cdr (assoc 10 vvl))))) (setq yv (rtos (car (cdr (cdr (assoc 10 vvl)))))) (vl-bb-set (read (strcat "r" " (rtos sx)")) (rtos (cdr (assoc 50 vvl)))) (vl-bb-set (read (strcat "xx" " (rtos sx)")) xv) (vl-bb-set (read (strcat "yy" " (rtos sx)")) yv) ) (princ) )
Solved! Go to Solution.