+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Jul 2012
    Posts
    19

    Default Need lisp for Rev cloud with tag

    Registered forum members do not see this ad.

    Hi all,
    I am new to this forum...

    Is it possible to create lisp for Revision cloud with tag?

    currently i am using Revision cloud in tool palettes with below mentioned command strings:-

    Single Text cloud - ^C^Ctcircle \\0.25 ^PR ^PV ^C^Crevcloud ^PO ^PL ^PN
    Window revision cloud - ^C^Crectangle \\Revcloud ^PO ^PL ^PN

    FYI... Revision cloud layer will be "0" & color in "Red"

    I have attached block for Revision number tag...

    Can anyone combine these commands in single lisp?

    It will be very helpful if it is possible...
    Attached Files

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,718

    Default

    Try something simple like:

    Code:
    (defun c:rv ( / *error* ar bn cm el fn rv )
    
        (setq bn "Rev# Block") ;; 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   )
                    )
                )                     
                (command "_.revcloud")
                (while (= 1 (logand 1 (getvar 'cmdactive))) (command "\\"))
                (setvar 'cmdecho 0)
                (setvar 'attreq  0)
                (setq el (entlast))
                (princ "\nSpecify Point for Revision Block: ")
                (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)
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  3. #3
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Jul 2012
    Posts
    19

    Default

    Thanks Lee Mac...I heard about you lot that you are genius in Lisp programs...

    I tried this lisp....its good... but.... Is it possible to change lisp using above mentioned command strings? it will be great..

    The Rev cloud will be come automatically to each word separate If we select single word or more words....
    Code:
    ^C^Ctcircle \\0.25 ^PR ^PV ^C^Crevcloud ^PO ^PL ^PN
    or if we make window select (Rectangle) 2 or more words...

    Code:
    ^C^Crectangle \\Revcloud ^PO ^PL ^PN
    I have attached image file..
    Attached Images
    Last edited by dreams; 26th Jul 2012 at 05:32 pm.

  4. #4
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,106

    Default

    dreams,

    Please read the CODE POSTING GUIDELINES and edit your posts to place the macro in code tags.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  5. #5
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Jul 2012
    Posts
    19

    Default

    Can someone help me regarding my above request?

  6. #6
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,106

    Default

    Can you help regarding my above request?
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  7. #7
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Jul 2012
    Posts
    19

    Default

    Hi SLW210.. Thanks for your suggestion about CODE POSTING GUIDELINES..I have already edited my post...i have requested some changes needed in lisp...sorry for my English..I am not very well in English..

  8. #8
    Junior Member
    Using
    AutoCAD 2007
    Join Date
    Jul 2012
    Posts
    19

    Default Need help to change macros for Revision cloud & tag

    Registered forum members do not see this ad.

    Hi
    I am not very well in English (sorry)...I don't know about macros or visual lisp....can any one help me to change below macros for revision cloud with tag?

    I got this old macro in this cadtutor forum from another useful post..but i have edited some changes as per my requirements with my knowledge..

    Code:
    ^C^C(setq a(getvar "clayer"));-layer;M;DETAIL;;^C^Crectangle \\Revcloud ^PO ^PL ^PN;;\;-Insert;"Rev_Tri.dwg";\1;1;0;-layer;S;!a;;
    Its working fine but is it possible to scale up or down for "Rev_Tri.dwg" as per my required layout area like scale 1/2 or 1/4 or 1/8...

    FYI..currently Revision triangle "Rev_Tri.dwg" scale is 1/4.. triangle text height will be 4-1/2" inches...

    Can anyone help me?
    Attached Images
    Attached Files

Similar Threads

  1. Revision Cloud LISP: help reviewing code
    By madonthemike in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 19th Jun 2012, 05:07 am
  2. Point Cloud
    By CNatka in forum Civil 3D & LDD
    Replies: 5
    Last Post: 21st May 2012, 04:03 pm
  3. Rev Cloud Problems
    By MAM in forum AutoCAD General
    Replies: 3
    Last Post: 17th Aug 2011, 08:49 pm
  4. PLINE Cloud?
    By AQucsaiJr in forum AutoLISP, Visual LISP & DCL
    Replies: 27
    Last Post: 22nd Sep 2009, 03:44 pm
  5. Revision Cloud
    By sparkyuk in forum AutoCAD Beginners' Area
    Replies: 6
    Last Post: 23rd Oct 2008, 03:53 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts