Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
If i have many ident dynamic blocks (with different dynamic length (=Distance1) and width (=Distance2)) - is there any possibility to get this result:
" -> Total length of dynamic Blocks with width *width (f.example 0.3)* :
-> Total length of dynamic Blocks with width *width (f.example 0.1)* :
-> Total length of dynamic Blocks with width *width (f.example 0.4)* : " and so forth....
see also the attached pic!
This Lisp is nearly there i have to get to (BIG THANKS TO @ВeekeeCZ) :
(vl-load-com)
(defun c:Test
(/ total selectionset count intger selectionsetname obj)
(defun LM:getdynpropvalue ( blk prp )
(setq prp (strcase prp))
(vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x))) (vlax-get x 'value)))
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(if (setq total 0
selectionset
(ssget '((0 . "INSERT")
(-4 . "<or")
(2 . "`*U*")
(2 . "_P1000")
(-4 . "or>")
)
)
)
(progn
(setq count (sslength selectionset))
(repeat (setq intger (sslength selectionset))
(setq selectionsetname
(ssname selectionset
(setq intger (1- intger))
)
obj (vlax-ename->vla-object selectionsetname)
total (+ total
(LM:getdynpropvalue obj "Distance1")
)))
(alert (strcat " Total number of Dynamic Blocks :"
"< "
(itoa count)
" >"
"\n"
" Total lengths of Dynamic Blocks :"
"< "
(rtos total 2)
" >"
)
)
)
(princ)
)
(princ)
)
The PERFECTNESS would be to choose optional output results in CSV.
please help me!
that would be awesome!
THANK YOU VERY MUCH!!!!!
Solved! Go to Solution.