I've been working on a program that extends the stretch function so it also works on dynamic blocks.
So if a stretch function is done and one of the grips of a dynamic block is inside of the selected area, the transformation is applied to the dynamic block as well.
The program is functional now
and works for most of the dynamic blocks I use!
But it doesn't work on chained actions as of yet. This is because step 3 below doesn't calculate chained actions yet and I'm not sure how to figure out how the parameters are chained. Hope some of you can help me make it work on those too!
Here is how the program works step by step and I have added comments in the lsp file:
- Preform the stretch action using the default Autocad command.
- For all blocks, get the default parameters using getBlockParameters.
- Transform those parameters using the settings of the selected block using getAppliedParameters. This returns the WCS points of where the grips of the selected blocks are.
- Check which grips were inside of the selection and change the parameters of the block if needed.
Below a demonstration on a dynamic block and the code itself.