View Full Version : array along a specified angle
n_withers
2006-06-29, 03:13 PM
Someone out there probably knows how to do this easily. I'm trying to array along a pre-determined angle. Even though the array dialog box lets the user pick the angle for the array, the commandline does not provide this same option. I know I can achieve the same result using other methods, but I'd really like to do this with a simple array statement. Anyone have any ideas?
Someone out there probably knows how to do this easily. I'm trying to array along a pre-determined angle. Even though the array dialog box lets the user pick the angle for the array, the commandline does not provide this same option. I know I can achieve the same result using other methods, but I'd really like to do this with a simple array statement. Anyone have any ideas?
Are you trying to do this through programming?
kennet.sjoberg
2006-06-29, 06:25 PM
I do not know if this will help, but anyway . . .
(defun c:copyN ( / Counter SelSet Pt1 Pt2 Cycles )
(setq Counter 1 )
(if (setq SelSet (ssget) )
(progn
(and
(setq Pt1 (getpoint "From : " ) )
(setq Pt2 (getpoint "To : " ) )
(setq Cycles (getint "Cycles : " ) )
)
(while (< Counter Cycles )
(command "._copy" SelSet "" Pt1 (polar Pt1 (angle Pt1 Pt2 ) (* (distance Pt1 Pt2 ) Counter )) )
(setq Counter (1+ Counter ) )
)
)
(princ ". . .nothing selected. " )
)
(princ)
)
You can replace the polar angle in the code, with your angle, if it is set global in a *globalvar*.
: ) Happy Computing !
kennet
n_withers
2006-06-29, 06:40 PM
Opei, Yes I'm trying to do this programatically. I've written a routine that makes a multi-pane window. I realized only recently that the array command does not give me an option to pick an angle for the array, thus all of the window panes are arrayed to the right!
Kennet, If I can't get the array command to work at an angle, then your code is the same principle I was planning on using for my routine. Thanks for posting it. Now I don't have to go dig code out of one of my old routines!
kennet.sjoberg
2006-06-29, 06:48 PM
Kennet, If I can't get the array command to work at an angle, then your code is the same principle I was planning on using for my routine. Thanks for posting it. Now I don't have to go dig code out of one of my old routines!
No problem, my code is not "of my old routines" I made it now in the fly. . .
Enjoy and . .
: ) Happy Computing !
kennet
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.