Copy Array

Copy Array

Anonymous
Not applicable
5,954 Views
8 Replies
Message 1 of 9

Copy Array

Anonymous
Not applicable

I would like to understand the copy array.

Why is it that i have to count the object i want to copy with the amount by wich i want to multiply?.

 

Example, i want to create 6 spaces between lines, i have got 1 line in my drawing wich i select en then i use copy, array en then i have to enter 8 items to the copy array, then i get 7 equall spaces and in total 8 lines.

 

But when i got 1 line already in my drawing, why i have to count the excisting line?, i am copying only 7 extra lines, so why can't i just enter 7 (of 7 copies?), it is a bit strange.

 

Is it also possible to copy array, whithout copying the last item, if there is already a object at the end, sort like divide?.

 

Thanks.

0 Likes
5,955 Views
8 Replies
Replies (8)
Message 2 of 9

Moshe-A
Mentor
Mentor
Accepted solution

@Anonymous  hi,

 

Well instead of seeing the ARRAY command as adding objects look at it as copy multiple and it seems that the programmer(s) who created it thought of the result of the total copies and that's include the one you select. they could do it as you offered and until they do use the following lisp:

 

enjoy

moshe

 

 

; rectangular array
(defun c:RecAR (/ askint askdist ; local functions
		  ss rows cols rowY colX)

 (defun askint (msg0 / val)
  (initget (+ 2 4))
   
  (if (not (setq val (getint (strcat "\nEnter the number of " msg0 " to add <1>: "))))
   2
   (1+ val)
  )
 ); askint

 (defun askdist (msg0 msg1)
  (initget (+ 2 4))
  (getdist (strcat "\nEnter the distance between " msg0 " or specify unit cell " msg1 ": "))
 ); askdist
  
 (if (and
       (setq ss (ssget))
       (setq rows (askint "rows (---)"))
       (setq cols (askint "columns (|||)"))
       (setq rowY (askdist "rows" "(---)"))
       (setq colX (askdist "columns" "(|||)"))
     )
  (command ".-array" "_si" ss "_r" rows cols rowY colX)    
 )

 (princ)
)

 

 

0 Likes
Message 3 of 9

Anonymous
Not applicable
Accepted solution

Thanks, i'm using AutoCad LT, is it possible tu use this LISP?, how does that work?.

0 Likes
Message 4 of 9

vinodkl
Mentor
Mentor
Accepted solution

Hi,

 

when you use copy array, you are no longer copying the object. You are  creating array of the selected object. You can assume it to be like you are using array function inside a copy command, as in array command(rectangular array) when you specify the number of column say for example 5,  it includes even the selected objects as well right?

So don't think of it as copy command when you use copy array, think of it as your using rectangular array which includes even the selected object. 

You can look into help, if you want more information. COPY (Command) 

 

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 5 of 9

Anonymous
Not applicable

Ok, thanks, so i always have to count the selected item with the amount of copies, ok.Is ther a option to automaticly delete the last one when you use array fit?, or is this not possible?.

0 Likes
Message 6 of 9

vinodkl
Mentor
Mentor
Accepted solution

Is ther a option to automaticly delete the last one when you use array fit?, or is this not possible?.

No that's not possible. You have to manually select the last object and then delete or a workaround would be to type in (after copy array with fit) command "E"(Erase) and then type in "L" (this would select the object which was created last) and then enter which would delete the last object.

I also follow the same method. 

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 7 of 9

Anonymous
Not applicable

Thanks, this words, i only have to make sure that the array only exists of 1 item, otherwise it will only delete the last thing copied.

 

So if i use a cirkel with a hatch, after copy array and delete last, there will be either the cirkel or the hatch still in the drawing at the end point of fit.

0 Likes
Message 8 of 9

vinodkl
Mentor
Mentor
Accepted solution

If the objects are more than one then it would delete only one object. You could again use erase and select last object (L) to delete the next last created object. 

 

 

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 9 of 9

Anonymous
Not applicable

Thanks

0 Likes