ARRANGE BLOCKS BY SELECTION ORDER

ARRANGE BLOCKS BY SELECTION ORDER

atawk
Enthusiast Enthusiast
3,855 Views
24 Replies
Message 1 of 25

ARRANGE BLOCKS BY SELECTION ORDER

atawk
Enthusiast
Enthusiast

is there a lisp to arrange blocks by selection order, (see attached image).

e.g.: the example below shows at the left some randomly distributed blocks where we need to rearrange them by "selection order" from 1 to 6 as shown on the right image. 

 

atawk_0-1643891320115.png

 

0 Likes
Accepted solutions (2)
3,856 Views
24 Replies
Replies (24)
Message 21 of 25

Kent1Cooper
Consultant
Consultant

@atawk wrote:

.... the order is still matter what i meant is when i select an object using window it doesn't sort out at end with the blocks arrangement. 


Then don't select an object using a window.  That's exactly why my first routine limits selection methods to only those that put things into the selection set in the order selected as originally requested, but adding the Fence option to the individual-pick method in your description.  Maybe mine could be altered to allow selection of a single object in any of those ways, and put it into the selection order, but not allow multiple objects.  Is that what you want to do?  But why select a single object in a window rather than just picking on it?

 

If you want to be able to select multiple objects in a window, and you want the positional order to be as it was within such a selection, maybe the routine linked by @pendean at Message 13 will do.  When you select multiple objects at one time by Window or Crossing or Lasso, they go into the selection set in -- I forget which -- either drawn order or reverse drawn order.   A routine could be made to determine relative left-to-right positions, and put them into a regular row accordingly, but all sorts of questionable possibilities arise.  For example, which of these two Circles is farther to the left?

Kent1Cooper_0-1643980153906.png

The big one because it extends farther leftward, or the small one because its center is farther left?  Blocks with varying insertion point locations relative to their drawn content present similar issues.  And what about things that are vertically aligned?  Does the order among those matter?  Etc., etc.

Kent Cooper, AIA
0 Likes
Message 22 of 25

tanbqtb03
Contributor
Contributor

Thanks for your lisp. If you please update this lisp new function: arrange object selected (text, block, rectang...) with x , y distance with dialog input value

Making such as: 03 rows, 5 colum.... Thanks

tanbqtb03_0-1678967617452.png

 

0 Likes
Message 23 of 25

WeTanks
Mentor
Mentor

distance between blocks,
Can additional control?

We.Tanks

EESignature

A couple of Fusion improvement ideas that could your vote/support:
図面一括印刷

0 Likes
Message 24 of 25

Kent1Cooper
Consultant
Consultant

Someone requested a version that asks the User for the gap size, rather than having it built in, and remembers that to offer as default on subsequent use.  See the attached.  It's still of the variety that requires individual-pick or Fence selection only, to define the order in the resulting row.

Kent Cooper, AIA
Message 25 of 25

Sea-Haven
Mentor
Mentor

Making such as: 03 rows, 5 column. Should only be one say columns so rows are made automatically.

 

Re a dcl yes this will do it.

 

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter values " "Hor gap " 5 4 "5000" "Ver gap " 5 4 "1500" "Columns" 5 4 "3" )))
(setq L1 (atof (nth 0 ans)) L2 (atof (nth 1 ans)) L3 (atof (nth 2 ans)))

 

 

SeaHaven_0-1680045210530.png

No code for arranging will leave that to you.