@Anonymous wrote:
... (!v1 and !v3 showing nil) i want to utilize car cadr of lower left corner & right upper corners points of rectangle for further programing.
or in a simple manner i want to insert blocks(user defined) at all four corners and at center of the rectangle please help me.
Those v1 and v3 variables are localized, which means they don't live past the end of the routine. Those two [the 1st and 3rd vertices, being opposite corners] are saved to those variables only for use in calculating halfway between them for the midpoint [that's why the other two are not saved as their own variables]. But I hope you understand that those two will not always be the lower left and upper right corners.
You don't need them. The corners [all of them] are in the corners variable, which is not localized, so it will still be there afterwards, along with the midpt variable for the center. You can do something like:
(command
"_.insert" "YourBlockName" (nth corners 0) "" "" "" ;; <-- this happens to be v1
"_.insert" "YourBlockName" (nth corners 1) "" "" ""
"_.insert" "YourBlockName" (nth corners 2) "" "" "" ;; <-- this happens to be v3
"_.insert" "YourBlockName" (nth corners 3) "" "" ""
"_.insert" "YourBlockName" midpt "" "" ""
)
[If your Block is defined for uniform scaling, remove one of the "" Enters from each line. If you want to use different Blocks at the different places, obviously edit in different Block names.]
If you really need to know which corners are lower left and upper right specifically, that is not difficult.
Kent Cooper, AIA