TheSwamp
CAD Forums => CAD General => Dynamic Blocks => Topic started by: MaDcAdDeR on July 14, 2016, 05:05:01 PM
-
Hi,
I'm trying to figure out if there is any way that I could have the array in my dynamic block "fit" to any length as opposed to having it be incremental having the array spacing be at 20'.
Example: If the block is stretched to be 65'-0", I would like the dots to be evenly spaced to not exceeding 20'-0" but at the same time fit for the overall length.
Please see attached for an example.
Possibly there is a way to add a formula to the array parameters but, I haven't been able to find it yet.
Thanks!
-
You can use the array command to create a path array and achieve something similar.
Attached is same drawing with path arrays with the measure and divide option. You can use the grips of the polyline to edit it length and see the result.
-
As a dynamic block? I don't think so, you are limited to traditional XY arrays. As Jeff mentioned the path array is a perfect function but that would occur outside of the dynamic block.
However I would take the lisp route.
Find the length
Calculate quantity
(setq num
(1 + (fix (/ len spacing
))))
Divide the line with blocks instead of point
(vl-cmdf "._divide" ent
"B" "AT" "N" num
)