josue Corona Posted December 12, 2019 Share Posted December 12, 2019 Hello is there script I can make that I can stretch a rectangle in increments ? it can be 2D rectangle. As for the size of the rectangle I could just type it in the object info palette? The increments would be a one way stretch. Thank you Quote Link to comment
WhoCanDo Posted December 13, 2019 Share Posted December 13, 2019 Can we know what your end result might be? Why are you needing this? It gives a direction to work in. Do you want the original to grow, or do you want a duplicate each time it grows? Quote Link to comment
LarryO Posted December 13, 2019 Share Posted December 13, 2019 Set the grid spacing and turn on snap to grid? Quote Link to comment
josue Corona Posted December 14, 2019 Author Share Posted December 14, 2019 Hello WhoCanDo and Larry, and yes (whocando) basically that's what I am trying to accomplish, that the object to duplicate itself, next to each other as I stretch the rectangle but it will stretch in its own increments. The size of the starting rectangle can be determine in the object info. Larry Can the grid spacing be determine if I try that alternative for now? Quote Link to comment
WhoCanDo Posted December 15, 2019 Share Posted December 15, 2019 (edited) I'm still not understanding your intention, but I'm guessing the following. Draw a rectangle and leave it selected. Run the macro and the elastic band will determine X and the location of the new rectangle. procedure Stretch_and_Move; var pt1, pt2 : vector; wth, ht : real; begin if (Count (Sel = True) = 1) then begin pt1.x := LeftBoundN (Sel = True); pt1.y := TopBoundN (Sel = True); wth := Width (Sel = True); ht := Height (Sel = True); DSelectAll; GetPtL (pt1.x, pt1.y, pt2.x, pt2.y); RectangleN (pt2.x, pt2.y, 1, 0, pt2.x - pt1.x, -Abs (ht)); end; end; run (Stretch_and_Move); Edited December 15, 2019 by WhoCanDo Revised RectangleN values Quote Link to comment
LarryO Posted December 15, 2019 Share Posted December 15, 2019 The grid spacing is easy to determine or set by double clicking the snap to grid icon. This will the bring up the smart cursor options allowing you to read the current spacing and change the grid spacing. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.