TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: TimAshby on March 06, 2015, 04:05:27 PM

Title: Determine orientation of linear parameter in dynamic block
Post by: TimAshby on March 06, 2015, 04:05:27 PM
I'm looking to create a version of the stretch command that works on dynamic blocks with linear parameters - I figure that to do this, I'd need to work out which way a parameter was pointing in the block, ie I dont want a vertical move being triggered by a horizontal stretch command!

I've gotten as far as Lee's dump dynamic properties code - this dumps a bunch of properties, one of which is the origin of the parameter, one of which is the value. None of which is the endpoint! Doing a dump on the parameter while in the block editor suggests that I should be able to (vla-get-endpoint), but passing one of the parameter objects from (vlax-invoke 'getdynamicproperties) gives an error. Cycling thro' the collection of VLA-objects shows only the lines, polylines etc.

Has anyone got any clever ideas?

Cheers!
Title: Re: Determine orientation of linear parameter in dynamic block
Post by: mailmaverick on March 08, 2015, 01:16:32 PM
Kindly attached your DWG file containing the dynamic block.
Title: Re: Determine orientation of linear parameter in dynamic block
Post by: TimAshby on March 09, 2015, 04:37:32 AM
I'm looking to create a command that stretches any dynamic block - it's not a problem with a specific block :-)
Title: Re: Determine orientation of linear parameter in dynamic block
Post by: mailmaverick on March 09, 2015, 07:55:43 AM
I'm looking to create a command that stretches any dynamic block - it's not a problem with a specific block :-)

I agree to what you say but for developing a lisp, a sample block is needed. Also send the initial block and what it should be after running the lisp.