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

LISP for copy and rotate

11 REPLIES 11
Reply
Message 1 of 12
msalimJFUSB
673 Views, 11 Replies

LISP for copy and rotate

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

11 REPLIES 11
Message 2 of 12

Tried ARRAYPATH?

Message 3 of 12

they need to have a different distance from each other and also different degree of rotation with respect to a guide line
Message 4 of 12
cadffm
in reply to: msalimJFUSB

Hi,

 

while you waiting for answer,

use arraypath  arrayclassic(polar) divide* or measure*

 

*as object you need a blockreference

 

Sebastian

Message 5 of 12
tramber
in reply to: msalimJFUSB

This Dynamic block ?

tramber_0-1718781433471.png

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

* stands for Classicinsert...

Message 6 of 12
RSomppi
in reply to: msalimJFUSB

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

Message 7 of 12
TomBeauford
in reply to: msalimJFUSB

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
Message 8 of 12
tramber
in reply to: msalimJFUSB

 

 

*^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 🙂

Message 9 of 12
Kent1Cooper
in reply to: msalimJFUSB

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
Message 10 of 12
Sea-Haven
in reply to: Kent1Cooper

"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.

Message 11 of 12
EnM4st3r
in reply to: msalimJFUSB

View -> Command Macros

there is a example Macro for Copy-Rotate
Message 12 of 12
EnM4st3r
in reply to: Kent1Cooper

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

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report