Author Topic: Revcloud Lisp  (Read 7696 times)

0 Members and 1 Guest are viewing this topic.

cadsmarts

  • Guest
Revcloud Lisp
« on: October 25, 2007, 10:53:16 AM »
All,

I am looking for an all inclusive rev cloud routine, One that allows you to choose revcloud type (Rectangle,Circle,Polyline): then
Arc length: then
Delta location: then
delta input.

This would be a nice utility, all in one revcloud system.

Thanx,

Cadman32002

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Revcloud Lisp
« Reply #1 on: October 25, 2007, 10:56:31 AM »
what have you done so far?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Revcloud Lisp
« Reply #2 on: October 25, 2007, 11:04:22 AM »
Welcome to theSwamp Cadman.

Perhaps this will give you some ideas.
http://www.theswamp.org/index.php?topic=1319.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

cadsmarts

  • Guest
Re: Revcloud Lisp
« Reply #3 on: October 25, 2007, 03:06:57 PM »
Well I started it as a macro

^C^C_rectang \\^C^C_revcloud;A;1/4;1/4;O;$M=$(if,$(getvar,cmdactive),,_select;)_l;N;^C^C_rectang

This allows the creation of a rectangle that is turned into a revcloud. As you can see it is very basic.
I am just starting out in lisp and am trying to get a grasp on understanding how it all works. I know I will need a lot of help from here on out.

Cadsmarts

deegeecees

  • Guest
Re: Revcloud Lisp
« Reply #4 on: October 25, 2007, 03:08:22 PM »
Looks promising, and welcome aboard.

DHOPP

  • Guest
Re: Revcloud Lisp
« Reply #5 on: November 08, 2007, 08:53:31 AM »
All,

I am looking for an all inclusive rev cloud routine, One that allows you to choose revcloud type (Rectangle,Circle,Polyline): then
Arc length: then
Delta location: then
delta input.

This would be a nice utility, all in one revcloud system.

Thanx,

Cadman32002

Here are the individual codes for each example you wish to have...edit them as you wish

*circle rev cloud*

Code: [Select]
(Defun C:cirrc ( / opt p1 p2 iph )
(setq p1(getpoint "\nPick Center Of Circle : "))
        (setq p2(getpoint p1 "\nOutside Edge: "))
        (setvar "plinewid" 0)
        (command "circle" p1 p2)
(command "REVCLOUD" "O" (entlast) "N"))
*pline revcloud*

Code: [Select]
(defun C:pc ()
  (command "_.PLINE")
  (while (= (getvar "CMDNAMES") "PLINE")
    (command pause)
  )
  (command "pedit" "l" "c" "")
  (command "revcloud" "a" pause "" "" "l" "no")
)

*rec revcloud*

Code: [Select]
(Defun C:RECRC ( / opt p1 p2 iph )
(setq p1(getpoint "\nPick first corner of window: "))
        (setq p2(getcorner p1 "\nOpposite corner: "))
        (setvar "plinewid" 0)
        (command "rectang" p1 p2)
(command "REVCLOUD" "O" (entlast) "N"))

use what you need from these

I put them together and included the delta symbol, it will also put rev history on the title block

here is that code

Code: [Select]
(defun C:rv (/ inp )
    (initget "Pline Rectangle Circle") ; ask for input
  (setq Inp (getkword "\nWhat type of cloud would you like to draw? [Pline/Rectangle/Circle] <Pline>: "))
  (or Inp (setq Inp "Pline"))

(cond
((= inp "Pline")
(load "C:\\home\\work\\dennis\\Lisp\\lisp routines\\pline_revcloud.lsp")
(C:pc)
)
((= inp "Rectangle")
(load "C:\\home\\work\\dennis\\Lisp\\lisp routines\\rec_revcloud.lsp")
(C:RECRC)
)
((= inp "Circle")
(load "C:\\home\\work\\dennis\\Lisp\\lisp routines\\circle_revcloud.lsp")
(C:cirrc)
)
)
       
(initget "1 2 3") ; ask for input
  (setq Inp (getkword "\nWhich Revision is this? [1/2/3] <1>: "))
  (or Inp (setq Inp "1"))
;;  ==============
  (rev inp)
  ;;  ==============
(princ)
)

(defun rev (r# / sp bp ep COOR ID PAUSE TR TX)
 
  (setq sp (getpoint (strcat "Insertion point of Rev." r# " symbol: ")))
  (setq bp sp)
  (while
    (not (equal ep bp))
     (command "arc" sp pause pause)
     (setq ep (getvar "lastpoint"))
     (setq sp ep)
  )

  ;;  Triangle routine
  (command "polygon" "3" bp "c" "5")
  (setq tr (list (car bp) (+ (cadr bp) 10)))
  (command "ortho" "off" "move" tr "" bp pause)
  (setvar "filedia" 0)
  (setq tx (getvar "lastpoint"))
  (command "color" "magenta" "text" "s" "dmt" "j" "m" tx "0" r# "color" "green")
  (setq tr (list (car (getvar "lastpoint")) (+ (cadr (getvar "lastpoint")) 10)))

  (cond
    ((= r# "1")
     (setq coor '(1598.7021 -997.0960)
           id   '(1610.7021 -1002.0960)
     )
    )
    ((= r# "2")
     (setq coor '(1598.7021 -1021.0960)
           id   '(1610.7021 -1026.0960)
     )
    )
    ((= r# "3")
     (setq coor '(1598.7021 -1045.0960)
           id   '(1610.7021 -1050.0960)
     )
    )
  )

  ;;============================================
  (command "copy" "c" tx tr "" tx coor)
  (command "text" "s" "dmt" "j" "bl" id 0)
  (prompt "\nInitials and Date, <ex. ABC - 4/16/93>: ")
  (setvar "filedia" 1)
)

hope this helps you