Saxlle Posted 21 hours ago Posted 21 hours ago 15 hours ago, HypnoS said: but if block doesn't have scale uniformly set to 1, it asks to type scale, rotation and attribute value, and it goes block by block. Its unnessery. This can be easily done, but, for that I need another example drawing from you or you can just play with that inside this part of code: (while (/= (cdr (assoc 0 data)) "SEQEND") (setq data (entget (entnext (cdr (assoc -1 data)))) tag_value (cdr (assoc 1 data)) val (append val (list (list tag_value block_name))) ) ) where you can add in variable "val" scale factor, rotation, etc. and implement inside this part of code: (command-s "-insert" block_name (list (+ (car npt) num) (cadr npt)) 1 0 (car (nth ct val))) instend of "1" and "0" (scale and rotation). 8 hours ago, BIGAL said: I realised should check which way line is drawn. So it will order based on end selected. A reverse of the block list where applicable. Yes @BIGAL, I know for that and also thinked about that, but for that, the user need to clarify direction of drawed polyline and eventualy reverse the polyline to get right orded of the blocks. It is a task that takes 5 seconds. 8 hours ago, BIGAL said: command "-INSERT" blkname "s" 1 pt 0.0) The "-insert" command are executed with the appropriate queries on my AutoCAD, so I can't say does it good or not. But, as always, thank you @BIGAL . Quote
BIGAL Posted 5 hours ago Posted 5 hours ago (setq plent (entsel "\nPick pline near end "))) (setq pt (cadr plent)) (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent))))) (setq obj (vlax-ename->vla-object plent)) (setq pt1 (vlax-curve-getstartPoint obj)) (setq pt2 (vlax-curve-getendPoint obj)) (setq d1 (distance pt pt1)) (setq d2 (distance pt pt2)) (if (> d1 d2)d (setq co-ord (reverse co-ord)) ) To reverse direction of a line or pline, "It is a task that takes 5 seconds." No its instant. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.