home *** CD-ROM | disk | FTP | other *** search
- ;*******TY\DIMPP.LSP******
- (defun C:DIMPP ( )
- (setq sdimexo (getvar "dimexo"))
- (setvar "dimexo" 0.0)
- (setvar "elevation" 0.0)
- (setvar "thickness" 0.0)
- (if (/= (getvar "clayer") "cc") (command "layer" "m" "cc" ""))
- (setq p0 (getpoint "enter P00 <old p00>:"))
- (if (null p0) (setq p0 p00) (setq p00 p0))
- (setq af (getangle "\n enter angle <0>:"))
- (if (null af) (setq af 0.0))
- (setq pcc (getpoint "enter point Pcc:"))
- (setq p1 p0 d01 0.0)
- (setq p2 (getpoint "enter P2:"))
- (command "dim1" "dimse1" "off" "" "dinse2" "off")
- (dimpp0)
- (command "dim1" "dimse1" "on" "")
- (setq wcy 1)
- (while wcy
- (setq p2 (getpoint "enter P2 <or RETURN for none>:"))
- (if (null p2) (setq wcy nil) (dimpp0))
- )
- (setvar "dimexo" sdimexo)
- )
- (defun dimpp0 ( )
- (setq d02 (distance p0 p2))
- (setq a02 (angle p0 p2))
- (setq a02f (- a02 af))
- (setq d02 (* d02 (cos a02f)))
- (setq d12 (- d02 d01))
- (setq p2 (polar p1 af d12))
- (command "dim1" "ali" p1 p2 pcc "")
- (setq p1 p2 d01 d02)
- )
- (command "dim1" "dimse1" "off")