fromMlm Posted August 23 Posted August 23 I found this nice revision cloud lisp made by Lee Mac: (defun c:rv ( / *error* ar bn cm el fn rv ) (setq bn "revlsp") ;; Rev Cloud Attributed Block (defun *error* ( msg ) (if cm (setvar 'cmdecho cm)) (if ar (setvar 'attreq ar)) (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\nError: " msg)) ) (princ) ) (setq cm (getvar 'cmdecho) ar (getvar 'attreq) ) (cond ( (not (or (tblsearch "BLOCK" bn) (and (setq fn (findfile (strcat bn ".dwg"))) (progn (setvar 'cmdecho 0) (command "_.-insert" fn nil) (setvar 'cmdecho cm) (tblsearch "BLOCK" bn) ) ) ) ) (princ (strcat "\n" bn ".dwg not found.")) ) ( (zerop (logand 2 (cdr (assoc 70 (tblsearch "BLOCK" bn))))) (princ (strcat "\n" bn " not attributed.")) ) ( (setq *rev* (cond ( (= "" (setq rv (getstring t (strcat "\nSpecify Revision" (if *rev* (strcat " <" *rev* ">: ") ": "))))) *rev* ) ( rv ) ) ) (initcommandversion) (command-s "_.revcloud") (while (= 1 (logand 1 (getvar 'cmdactive))) (command "\\")) (setvar 'cmdecho 0) (setvar 'attreq 0) (setq el (entlast)) (command "_.-insert" bn "_S" 1.0 "_R" 0.0 "\\") (if (not (eq el (setq el (entlast)))) (progn (setq el (entget (entnext el))) (if (entmod (subst (cons 1 *rev*) (assoc 1 el) el)) (entupd (cdr (assoc -1 el))) ) ) ) (setvar 'attreq ar) (setvar 'cmdecho cm) ) ) (princ) ) (princ) What I wish to do is: 1. Set the insertion point with variable rotation using osnap nearest and then back to current osnaps 2. - Save current layer/working layer. - Then temporarily change to a new given layer but change colour on the revision cloud to cyan (not the block) - Do the revision cloud and the insert. - Finally change back to my working layer. (in my case "K596 - Revideringsmoln") REVLSP.dwg I have tried to delete the 0.0 (command "_.-insert" bn "_S" 1.0 "_R" "\\") It just allows me to rotate the block and then place it. And the revision do not show. I would like to place first and then rotate. How do I specify the insert point for the block so I can rotate it? Quote
BIGAL Posted August 24 Posted August 24 "How do I specify the insert point for the block so I can rotate it?" A block is normally rotated around its insertion point when using "INSERT" you can rotate a block after its inserted and have a different base point for the rotation. So if you know the block relationship to a new base point and insertion point then yes can be done via a simple lisp.Insert then rotate. Quote
fromMlm Posted August 24 Author Posted August 24 Thanks for the replay BIGAL! What I wished for was to use Lee Macs revision lisp and modify it, so I can rotate my revision block. This part in the lisp seems to be the part I have to modify: (command "_.-insert" bn "_S" 1.0 "_R" 0.0 "\\") If I understand this part of the code, 0.0 is a fixed angle. So I deleted 0.0 to see if it made the rotation flexible. But it didn't quite do what I wanted...(the revison didn't shoe e.g.) Do I need to create another variable like "pt" and put it into the code above? Or how do I alter this code part to suite what I wish for? Here is an example I found where pt is present : (setq pt (getpoint "\nSpecify insertion point (or Enter to stop) : \n")) (command "-insert" bname pt 1 1 0) Quote
fromMlm Posted September 2 Author Posted September 2 Hi again Is there anybody who could help me tweak the above menstioned Lisp? I think it must be this row that has to be altered. (command "_.-insert" bn "_S" 1.0 "_R" 0.0 "\\") Quote
BIGAL Posted September 2 Posted September 2 You can use pause to enter angle or something like this allows onscreen dragging of angle. (command-s "_.-insert" bn "_S" 1.0 (getpoint "\nPick point for insertion ")) Quote
fromMlm Posted September 3 Author Posted September 3 thanks for the reply! I will look into it. 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.