Philipp Posted May 22, 2021 Posted May 22, 2021 Hello! In trimble nova there is a command called draggen. It is used to catch an entity, copy it and when placed it can be rotated with tab 90° every tap on a key (space or tab I think). Also the entitys are self aligning on straight lines. I have here a concept of rotating a block 90°: ; (defun c:RT (/ cEnt) (setq cEnt (ssget)) (if (null cEnt) (setq cEnt (entget "\n Select Objects: ")) ) (command "ROTATE" cEnt "" "@0,0,0" 90) (while (or (initget "Y") (/= "N" (setq response (getkword "\nRotate again? (Y/ESC): ")) (command "ROTATE" "P" "" "@0,0,0" 90) ) ) ) ) ; The problem in this is that it will only rotate two times. Can it be written into a circeling program? Also I have a self aligning block, (I hope it works with autocad) The problem is, I will need to copy the block at first, it should not copy it, but search for the information and insert a new one with all parameters of the old to get the base point wich is aligning So the program should work like: -Chose Block in drawing -Insert exact same Block with aligning Basepoint on handle -(like rotate via key it would be nice to put in a list of offsets and scroll through) -click to place -the rotate 90° each tab on a key -Enter to confirm Does anyone know a lisp program that reassambles the "draggen" command or can someone help me to write the lisp? NONAME_0.dwg Quote
BIGAL Posted May 23, 2021 Posted May 23, 2021 This was answered previously and would just keep going, will try to find. I think Lee-mac may have provided a solution. The auto align could be added as a choice Quote
Philipp Posted May 29, 2021 Author Posted May 29, 2021 I found this thread but I dont think it is what you meant: copy-and-rotate-multiple Unfortunatly the posted code does not work anyways it say "invalid parameter" after defining new base-point Has someone found a solution to get the command done posted earlier? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.