Saxlle Posted July 25 Posted July 25 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 July 25 Posted July 25 (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
HypnoS Posted 19 hours ago Author Posted 19 hours ago TBH devito code meets my needs, for what i send big thanks once more. One thing I'd like to be added is to let me change distance between blocks Quote
SLW210 Posted 16 hours ago Posted 16 hours ago 2 hours ago, HypnoS said: TBH devito code meets my needs, for what i send big thanks once more. One thing I'd like to be added is to let me change distance between blocks Did you bother to try my code? It asks for a line and distance between blocks. Quote
HypnoS Posted 15 hours ago Author Posted 15 hours ago @SLW210 I tried yours but I cant get it to work, I think Im missing something. "Enter the tag to use" What tag am I supposed to type in? Attribute name or value does not work. Quote
devitg Posted 13 hours ago Posted 13 hours ago 6 hours ago, HypnoS said: TBH devito code meets my needs, for what i send big thanks once more. One thing I'd like to be added is to let me change distance between blocks It ask you to set such distance Or you mean to set distance for each block at the straight line? Quote
SLW210 Posted 6 hours ago Posted 6 hours ago 8 hours ago, HypnoS said: @SLW210 I tried yours but I cant get it to work, I think Im missing something. "Enter the tag to use" What tag am I supposed to type in? Attribute name or value does not work. The actual TAG name, in the drawing you posted it is ADRES 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.