home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
GR
/
GR505.ZIP
/
LSP.EXE
/
LOGLIN.LSP
< prev
next >
Wrap
Text File
|
1989-09-06
|
2KB
|
50 lines
;-----------------------------------------------------------------------------
;This routine will convert a continuous line to an ISA standard
;data logic line for process flow drawings. Simply load and invoke
;"logic" and select the line to convert. Then select the line.
;The line will be broken up and circles added to it to
;make an ISA standard data logic linetype. This routine is cheerfully
;written and given away! If any improvements can be made feel free to
;do so! Jeff L. Nims
; Compuserve ID: 72047,632
;-----------------------------------------------------------------------------
(defun C:LOGIC (/ E ENAME ETBL XYstart XYend XYS XYE A XYEE D Dfixed)
(setvar "cmdecho" 0) ;Initialization
(graphscr) ;Initialization
(setq E (entsel "\nSelect the line you wish to convert: "))
(setq ENAME (car E))
(setq ETBL (entget ENAME)) ;Produce entity table
(setq XYstart (car (cdddr ETBL))) ;Line XY start
(setq XYend (car (cddddr ETBL))) ;Line XY end
(setq XYS (cdr XYstart)) ;Extract xy beginning
(setq XYE (cdr XYend)) ;Extract xy ending
(setq A (angle XYS XYE)) ;Obtain line angle
(setq XYEE (polar XYE A -0.25)) ;Trim .25 from end of line
(setq D (distance XYS XYEE)) ;Find line length
(setq D2 (/ D 0.5)) ;Calculate how many conversions
(setq Dfix (fix D2)) ;Filter out the fraction
(setq Dfixed (- Dfix 1))
(setq PT (polar XYS A 0.5)) ;Find break starting point
(setq PT2 (polar PT A 0.25)) ;Find break ending point
(if (< Dfixed 1) ;Test to see if line can be
; converted
(prompt "\nLINE TOO SHORT TO BE CONVERTED! ")
(convert)
)
(terpri)
(princ)
)
(defun convert ()
(prompt "\nConverting... ")
(command "break" E "f" PT PT2)
(command "circle" (polar PT A 0.125) "d" 0.0625)
(Repeat Dfixed
(setq PT (polar PT A 0.5))
(command "break" PT (polar PT A 0.25))
(command "circle" (polar PT A 0.125) "d" 0.0625)
)
(terpri)
(princ)
)