Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Arrangement drawings

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
Anonymous
622 Views, 21 Replies

Arrangement drawings

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!

 

20140918091710.jpg

 

 

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.

21 REPLIES 21
Message 21 of 22
pbejse
in reply to: Anonymous


@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-0052-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

 

Message 22 of 22
Anonymous
in reply to: pbejse

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>: 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost