Jump to content

Revcloud Macro


Recommended Posts

Im not sure if there's a direct macro for that (but please correct me if im wrong). perhaps a LISP could be better. try to start a thread in the LISP section on this topic, those guys are goooood with this things :D

Link to comment
Share on other sites

iam sorry i forget explain what i mean i need rectangular revcloud macro.

sorry again

 

I have two lisp you might like.

 

First one:

 

1. Make Rev Triangle Layer

2. Make RevCloud Layer

3. Draw Rectangle

4. Make the Rectangle into a reccloud. (The Arc is predetermined by the dimscale)

5. Make the revcloud thicker with pedit

6. Insert the revtriangle

7. Edit the triangles text inside

 

(defun c:rev1 ()                                                                
 (vl-load-com)                                                                 
 (command "_.layer" "m" "RevT1" "c" "145" "" "")                               
 (command "_.layer" "m" "Revcloud1" "c" "2" "" "") ; Make layer & sets Current 
 (COMMAND "_RECTANG" PAUSE PAUSE) 
 (COMMAND "_.REVCLOUD" "_a" (* 0.35 (getvar "DIMSCALE")) "" "_o" "L" "_N")                                              
 (command "_pedit" "l" "w" (* (getvar "dimscale") 0.015) "")                   
 (command "_.layer" "s" "Revt1" "") ;; Make layer Revt1 Current                
 ;; Insert Revtri Block.                                                       
 (command "_INSERT" "RevTri" "s" (getvar "dimscale") pause "0")                
 (command "_attedit" "n" "y" "" "" "" "l" "1" "1")                             
)  

 

 

 

Second one:

 

It is the same as above but it lets you make a revcloud out of a pline.

 

(defun c:rev1 () 
(vl-load-com) 
(command "_.layer" "m" "RevT1" "c" "145" "" "") 
(command "_.layer" "m" "Revcloud1" "c" "2" "" "") ; Make layer & sets Current 
(c:plev) ;; call the routine 
(command "_pedit" "l" "w" (* (getvar "dimscale") 0.015) "") 
(command "_.layer" "s" "Revt1" "") ;; Make layer Revt1 Current 
;; Insert Revtri Block. 
(command "_INSERT" "RevTri" "s" (getvar "dimscale") pause "0") 
(command "_attedit" "n" "y" "" "" "" "l" "1" "1") 
) 

(defun c:plev (/ lOb nPl) 
(setq lOb (entlast)) 
(command "_.pline") 
(while (/= 0 (getvar "CMDACTIVE")) (command pause)) ; end while 
(if (not (equal c (setq nPl (entlast)))) 
(command "_.revcloud" "_a" (* 0.35 (getvar "DIMSCALE")) "" "_o" nPl "_n") 
) ; end if 
(princ) 
) ; end of c:plev

 

Hope you like. If you have any questions feel free to ask.

Link to comment
Share on other sites

  • 2 weeks later...

i have a question plz :D

 

i was just working on my own code

tho im having problems with the after math of the cloud, im useing pause, for the user to either select a rentanlge or pline or by doing by hand

which workings fine

but then it dosnt listen to the next bit of code where it inserts the revtriangle

 

(defun c:rrc ()
;setup
(setvar "cmdecho" 0)
(setq sc (getvar "dimscale"))
(SETQ LA (GETVAR "OSMODE"))
(SETVAR "OSMODE" 0)
(COMMAND "ATTDIA" 0)
;(setq oldlayer (getvar "layer"))  
(command ".layer" "m" "REV" "c" "white" "REV"\)

(setq DNO (getvar "dwgname"))
(princ dnO)
(SETQ FL (STRLEN DNO))
(SETQ FL2 (- FL 4))
(SETQ RN (STRCASE(SUBSTR DNO FL2 1)))
(setq ard (* 5 sc))
;Draws the revcloud
(command "revcloud" "ar" ard ard pause)
(princ)
;added triangle
(setq tl (getpoint "\nInsertion point for revision triangle: "))
(command "-INSERT" "REVMARK" tl sc sc 0 rn)
(SETVAR "OSMODE" LA)
(COMMAND "ATTDIA" 1)
;(COMMAND "CLAYER" oldlayer)
(setvar "cmdecho" 1)
)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...