Author Topic: Revision cloud using calligraphy arcs  (Read 1577 times)

0 Members and 1 Guest are viewing this topic.

notredave

  • Newt
  • Posts: 140
Revision cloud using calligraphy arcs
« on: March 01, 2016, 10:27:22 AM »
To whomever can help me out,

Using Mr. Lee Mac's code and I appreciate it very much, but can someone edit code to use the fancy calligraphy arcs instead of the regular arcs? My lisp routine will be complete then. I am using Autocad 2015.
 
Thanks in advance,
David

Code - Auto/Visual Lisp: [Select]
  1. (defun c:rv ( / *error* ar bn cm el fn rv )
  2.  
  3.     (setq bn "REVTAG") ;; Rev Cloud Attributed Block
  4.    
  5.     (defun *error* ( msg )
  6.         (if cm (setvar 'cmdecho cm))
  7.         (if ar (setvar 'attreq ar))
  8.         (if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
  9.             (princ (strcat "\nError: " msg))
  10.         )
  11.         (princ)
  12.     )
  13.  
  14.     (setq cm (getvar 'cmdecho)
  15.           ar (getvar 'attreq)
  16.     )
  17.     (cond
  18.         (   (not
  19.                 (or (tblsearch "BLOCK" bn)
  20.                     (and
  21.                         (setq fn (findfile (strcat bn ".dwg")))
  22.                         (progn
  23.                             (setvar 'cmdecho 0)
  24.                             (command "_.-insert" fn nil)
  25.                             (setvar 'cmdecho cm)
  26.                             (tblsearch "BLOCK" bn)
  27.                         )
  28.                     )
  29.                 )
  30.             )
  31.             (princ (strcat "\n" bn ".dwg not found."))
  32.         )
  33.         (   (zerop (logand 2 (cdr (assoc 70 (tblsearch "BLOCK" bn)))))
  34.             (princ (strcat "\n" bn " not attributed."))
  35.         )
  36.         (   (setq *rev*
  37.                 (cond
  38.                     (   (= "" (setq rv (getstring t (strcat "\nSpecify Revision" (if *rev* (strcat " <" *rev* ">: ") ": ")))))
  39.                         *rev*
  40.                     )
  41.                     (   rv   )
  42.                 )
  43.             )                    
  44.             (command "_.revcloud")
  45.             (while (= 1 (logand 1 (getvar 'cmdactive))) (command "\\"))
  46.             (setvar 'cmdecho 0)
  47.             (setvar 'attreq  0)
  48.             (setq el (entlast))
  49.             (princ "\nSpecify Point for Revision Block: ")
  50.             (command "_.-insert" bn "_S" 1.0 "_R" 0.0 "\\")
  51.             (if (not (eq el (setq el (entlast))))
  52.                 (progn
  53.                     (setq el (entget (entnext el)))
  54.                     (if (entmod (subst (cons 1 *rev*) (assoc 1 el) el))
  55.                         (entupd (cdr (assoc -1 el)))
  56.                     )
  57.                 )
  58.             )
  59.             (setvar 'attreq  ar)
  60.             (setvar 'cmdecho cm)
  61.         )
  62.     )    
  63.     (princ)
  64. )
« Last Edit: March 02, 2016, 09:33:36 AM by John Kaul (Se7en) »

ChrisCarlson

  • Guest
Re: Revision cloud using calligraphy arcs
« Reply #1 on: March 01, 2016, 10:58:35 AM »
Should just need to pass an "S" and "C"

Code - Auto/Visual Lisp: [Select]
  1. (command "_.revcloud" "S" "C")

notredave

  • Newt
  • Posts: 140
Re: Revision cloud using calligraphy arcs
« Reply #2 on: March 01, 2016, 12:15:36 PM »
ChrisCarlson,
I am not sure where to change that. Can you tell me exactly where to put that command or edit the one above please?

notredave

  • Newt
  • Posts: 140
Re: Revision cloud using calligraphy arcs
« Reply #3 on: March 01, 2016, 12:20:37 PM »
ChrisCarlson,
Nevermind, I figured it out and works like a champ!
Thank you very much

notredave

  • Newt
  • Posts: 140
Re: Revision cloud using calligraphy arcs
« Reply #4 on: March 01, 2016, 03:58:12 PM »
Lee Mac, if you're out there, please help me or someone else,
While looking around the web, I saw this:
(command "revcloud" "A" (* 0.3125 (getvar "DIMSCALE")) "")

That works great on scaled drawings, my question is where can I incorporate that into Lee Mac's lisp code to make it work.

Thanks in advance,
David

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Revision cloud using calligraphy arcs
« Reply #5 on: March 01, 2016, 06:12:44 PM »
You can incorporate it as part of the REVCLOUD command call, i.e:
Code - Auto/Visual Lisp: [Select]
  1. (command "_.revcloud" "_A" (* 0.3125 (getvar 'dimscale)) "" "_S" "_C")

PS: Please edit your post and enclose your code with code tags:

[code]Your code here[/code]

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: Revision cloud using calligraphy arcs
« Reply #6 on: March 01, 2016, 08:15:46 PM »
In addition to using the code tags in your initial post I would also like to ask you to please also attach any header Lee had on his original code. Also, you may receive more help if you address other members of this forum--instead of just Lee (many people may be able to help and I'm sure Lee is often busy).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

ChrisCarlson

  • Guest
Re: Revision cloud using calligraphy arcs
« Reply #7 on: March 02, 2016, 09:20:50 AM »
If you are putting revision clouds into model space, why not just make the revision block annotative?