LISP for copy and rotate

LISP for copy and rotate

msalimJFUSB
Observer Observer
1,556 Views
11 Replies
Message 1 of 12

LISP for copy and rotate

msalimJFUSB
Observer
Observer

Can anyone help me make a LISP for copying an object then rotating it as well with just one command. Attaching a

picture for reference. They need to have different distance with each other. Thanks

 

 

image.png

0 Likes
1,557 Views
11 Replies
Replies (11)
Message 2 of 12

Tomislav.Golubovic
Advisor
Advisor

Tried ARRAYPATH?

0 Likes
Message 3 of 12

msalimJFUSB
Observer
Observer
they need to have a different distance from each other and also different degree of rotation with respect to a guide line
0 Likes
Message 4 of 12

cadffm
Consultant
Consultant

Hi,

 

while you waiting for answer,

use arraypath  arrayclassic(polar) divide* or measure*

 

*as object you need a blockreference

 

Sebastian

0 Likes
Message 5 of 12

tramber
Advisor
Advisor

This Dynamic block ?

tramber_0-1718781433471.png

I(*) then click and ENTER, ENTER, etc...

* stands for Classicinsert...


EESignature

0 Likes
Message 6 of 12

RSomppi
Mentor
Mentor

The command MOCORO let's you move, copy, and rotate within the same command.

0 Likes
Message 7 of 12

TomBeauford
Advisor
Advisor

Try Lee Mac's Align Objects to Curve lisp: https://www.lee-mac.com/objectalign.html

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 8 of 12

tramber
Advisor
Advisor

 

 

*^c^c_insert;"truc";\;;;

 

 

I put that macro in a button and it's terribly efficient. "Truc" is the name of the block (I put "Truc" and not Truc(*), in case, better habit since a name can contain spaces)

Escape to end.

*Thing 🙂


EESignature

0 Likes
Message 9 of 12

Kent1Cooper
Consultant
Consultant

I'm not sure how I would go about it, if in any way different from what has already been suggested.  But however it is to be accomplished, there are questions.

What would the User process be?  Select a path object to copy along, and select the object?  Or objects?  [That is, could your triangle be three Lines?]  Specify something as the object that isn't already there to select, such as a Block name, and Insert that as part of the process?  Be asked to draw something instead of select something?  Then what?  Pick a starting reference point along the path?  Or use the nearest point along the path as the starting reference?  Nearest to what on the selected object(s)?  And in what form would the varying distances be supplied?  Ask the User for each spacing as it goes along?  Pull them from something like a list variable or a .csv or .txt file?  Specify at least the first copy location on the path itself [not just as a distance number], so the routine knows whether to work in the path's drawn direction or the other way?  Etc., etc.

Kent Cooper, AIA
0 Likes
Message 10 of 12

Sea-Haven
Mentor
Mentor

"so the routine knows whether to work in the path's drawn direction or the other way?" picking an end when asked for path can be used to determine direction. Then ask which side. 

 

Maybe use something like type 12,12,14,15,7,8 as distance input.

 

Need poster to provide more details.

0 Likes
Message 11 of 12

EnM4st3r
Advocate
Advocate
View -> Command Macros

there is a example Macro for Copy-Rotate
0 Likes
Message 12 of 12

EnM4st3r
Advocate
Advocate

yes, also it looks like the relative angle to the curve is always the same, so it could also be calculated from the first block

0 Likes