Hi guys
At "Mode space" , I have some drawing. maybe is not the same as the size of the drawing frame .
I need to arrange them neatly by drawing No. (eg;1-SS706A-003).
I hope can set Columns
Can set Row spacing and columns spacing too!
I appriciate your help!
For a while before , Mr.hmsilva helped me write a code about "batch insert Xref and Arrangement" (Very grateful)
This have some different, No need insert, The object is not Xref. only need arrangement.
sorry! I don't understand programming, so Need help again !Many thanks!
Drawing frame is not the same ,See Attachments.
Solved! Go to Solution.
Solved by pbejse. Go to Solution.
@Anonymous wrote:
Thank you very much! pBe, great!
I found several problems .
1)I set Column spacing=100,But actual is 200 ,(2 magnification), I set 200, actual is 400
2) Sort problems, sort by the last three digits of drawing No.
eg.
1-SS706A-001,2-SS706A-002,3-SS706A-003, 1-SS706A-004,1-SS706A-005 this is right.
1-SS706A-001,1-SS706A-004,1-SS706A-005, 2-SS706A-002,3-SS706A-003 this is wrong.
3) pick point should be at upper left corner, not lower left corner.
1) Column spacing issue [Bug found|Easy Fix]
(setq bp (polar bp 0.0 (+ RSd COd (caaddr (cadr set_))))) Should be (setq bp (polar bp 0.0 (+ COd (caaddr (cadr set_)))))
2).Sort problems < i had no idea you are targetting exclusively the last three digits [Sort by last 3 Digits | Again easy fix]
Change this (setq Tblocks (vl-sort Tblocks '(lambda (x y) (< (car x) (car y))))) To this (setq _suff (lambda (str) (substr str (vl-string-position 45 str nil T) )) Tblocks (vl-sort Tblocks '(lambda (x y) (< (_suff (car x)) (_suff (car y))))))
3) upper left corner, not lower left corner. <----- read comment below
NO, This will remain as bottom left. the math is easier and besides i want it that way :), plus I think i've spend enough time playing around with this code.
HTH
Cheers
Thank you so much! pBe. nice! cool!
about change "pick basic point" ,if difficult,just let it be.
last request .
I want to have a default value,Not every time input
eg.
Enter Number of Columns<30>: Enter Row spacing<100>: Enter Column spacing<100>: