home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p047 / 4.ddi / TY / DIMPP.LSP < prev    next >
Encoding:
Text File  |  1988-10-30  |  1.1 KB  |  36 lines

  1. ;*******TY\DIMPP.LSP******
  2. (defun C:DIMPP ( )
  3.   (setq sdimexo (getvar "dimexo"))
  4.   (setvar "dimexo" 0.0)
  5.   (setvar "elevation" 0.0)
  6.   (setvar "thickness" 0.0)
  7.   (if (/= (getvar "clayer") "cc") (command "layer" "m" "cc" ""))
  8.   (setq p0 (getpoint "enter P00 <old p00>:"))
  9.     (if (null p0) (setq p0 p00) (setq p00 p0))
  10.   (setq af (getangle "\n enter angle <0>:"))
  11.     (if (null af) (setq af 0.0))
  12.   (setq pcc (getpoint "enter point Pcc:"))
  13.   (setq p1 p0 d01 0.0)
  14.   (setq p2 (getpoint "enter P2:"))
  15.   (command "dim1" "dimse1" "off" "" "dinse2" "off")
  16.   (dimpp0)
  17.   (command "dim1" "dimse1" "on" "")
  18.   (setq wcy 1)
  19.     (while wcy
  20.       (setq p2 (getpoint "enter P2 <or RETURN for none>:"))
  21.         (if (null p2) (setq wcy nil) (dimpp0))
  22.     )
  23.   (setvar "dimexo" sdimexo)
  24. )
  25. (defun dimpp0 ( )
  26.   (setq d02 (distance p0 p2))
  27.   (setq a02 (angle p0 p2))
  28.   (setq a02f (- a02 af))
  29.   (setq d02 (* d02 (cos a02f)))
  30.   (setq d12 (- d02 d01))
  31.   (setq p2 (polar p1 af d12))
  32.   (command "dim1" "ali" p1 p2 pcc "")
  33.   (setq p1 p2 d01 d02)
  34. )
  35. (command "dim1" "dimse1" "off")
  36.