12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511 |
- (defun c:lgq()
- (setq bili (= 5 6))
- (setq point (getstring "\nChange size of point (y/n) ? :"))
- (setq size (getreal "\nScale factor <8.33> ? :"))
- (prin1)
- )
- (defun C:TB()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (command "layer" "m" "8616" "c" "3""""")
- (setq zp (getpoint "Input Point Position , Please !"))
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (SETQ LM (+ LMA 1.5))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* 0.001875 bili))))
- (setq ap (list x (- y (* bili 0.001875))))
- (command "text" "j" "mc" zp (* bili 0.0024) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* 0.0024 bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lm 0.001875 bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
-
- (defun C:CCH()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (setq xg 0.002)
- (setq xk 0.0015)
- (if (< bili 2500) (progn
- (setq xg 0.0024)
- (setq xk 0.0018)
- )
- )
- (command "layer" "m" "9212" "c" "1""""")
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq zp (getpoint "Input Point Position , Please !"))
- (command "insert" "c:/maped/lib/ch" zp bili """")
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* xk bili))))
- (setq ap (list x (- y (* bili xk))))
- (command "text" "j" "mc" zp (* bili xg) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* xg bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lma xk bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
- (defun C:CCC()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (setq xg 0.002)
- (setq xk 0.0015)
- (if (< bili 2500) (progn
- (setq xg 0.0024)
- (setq xk 0.0018)
- )
- )
- (command "layer" "m" "9212" "c" "1""""")
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq zp (getpoint "Input Point Position , Please !"))
- (if (< bili 2500) (command "insert" "c:/maped/lib/cc" zp bili """"))
- (if (> bili 2500) (command "insert" "c:/maped/lib/c3" zp bili """"))
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* xk bili))))
- (setq ap (list x (- y (* bili xk))))
- (command "text" "j" "mc" zp (* bili xg) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* xg bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lma xk bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
- (defun C:CCG()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (setq xg 0.002)
- (setq xk 0.0015)
- (if (< bili 2500) (progn
- (setq xg 0.0024)
- (setq xk 0.0018)
- )
- )
- (command "layer" "m" "9212" "c" "1""""")
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq zp (getpoint "Input Point Position , Please !"))
- (if (< bili 2500) (command "insert" "c:/maped/lib/cg" zp bili """"))
- (if (> bili 2500) (command "insert" "c:/maped/lib/c5" zp bili """"))
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* xk bili))))
- (setq ap (list x (- y (* bili xk))))
- (command "text" "j" "mc" zp (* bili xg) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* xg bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lma xk bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
- (defun C:CCF()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (setq xg 0.002)
- (setq xk 0.0015)
- (if (< bili 2500) (progn
- (setq xg 0.0024)
- (setq xk 0.0018)
- )
- )
- (command "layer" "m" "9212" "c" "1""""")
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq zp (getpoint "Input Point Position , Please !"))
- (if (< bili 2500) (command "insert" "c:/maped/lib/cf" zp bili """"))
- (if (> bili 2500) (command "insert" "c:/maped/lib/c5" zp bili """"))
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* xk bili))))
- (setq ap (list x (- y (* bili xk))))
- (command "text" "j" "mc" zp (* bili xg) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* xg bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lma xk bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
- (defun C:CCI()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (setq xg 0.002)
- (setq xk 0.0015)
- (if (< bili 2500) (progn
- (setq xg 0.0024)
- (setq xk 0.0018)
- )
- )
- (command "layer" "m" "9212" "c" "1""""")
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq zp (getpoint "Input Point Position , Please !"))
- (if (< bili 2500) (command "insert" "c:/maped/lib/ci" zp bili """"))
- (if (> bili 2500) (command "insert" "c:/maped/lib/c7" zp bili """"))
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* xk bili))))
- (setq ap (list x (- y (* bili xk))))
- (command "text" "j" "mc" zp (* bili xg) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* xg bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lma xk bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
- (defun C:CCB()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (setq xg 0.002)
- (setq xk 0.0015)
- (if (< bili 2500) (progn
- (setq xg 0.0024)
- (setq xk 0.0018)
- )
- )
- (command "layer" "m" "9212" "c" "1""""")
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq zp (getpoint "Input Point Position , Please !"))
- (if (< bili 2500) (command "insert" "c:/maped/lib/cb" zp bili """"))
- (if (> bili 2500) (command "insert" "c:/maped/lib/c1" zp bili """"))
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* xk bili))))
- (setq ap (list x (- y (* bili xk))))
- (command "text" "j" "mc" zp (* bili xg) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* xg bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lma xk bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
- (defun C:CCK()
- (while (= bili nil)
- (setq bili (getint "input scale parameter:"))
- )
- (command "layer" "m" "9212" "c" "1""""")
- (setq l1 (getstring "\nEnter Up Number:"))
- (setq l2 (getstring "\nEnter Down Number:"))
- (setq zp (getpoint "Input Point Position , Please !"))
- (command "insert" "c:/maped/lib/ck" zp bili """")
- (setq x (car zp))
- (setq y (cadr zp))
- (setq lma ( max (strlen l1) (strlen l2)))
- (setq ss (ssadd))
- (setq zp (list x (+ y (* 0.0015 bili))))
- (setq ap (list x (- y (* bili 0.0015))))
- (command "text" "j" "mc" zp (* bili 0.002) 0 l1)
- (setq ss (ssadd (entlast) ss))
- (command "text" "j" "mc" ap (* 0.002 bili) 0 l2)
- (setq ss (ssadd (entlast) ss))
- (setq lgq (* lma 0.0015 bili))
- (setq bp (list (- x (-(/ lgq 2 ) (* 0.0008 bili))) y))
- (setq cp (list (- (+ x (/ lgq 2)) (* 0.0008 bili)) y))
- (command "line" bp cp "")
- (setq ss (ssadd (entlast) ss))
- (COMMAND "MOVE" SS "" ZP)
- (prin1)
- )
- (defun C:3p()
- (graphscr)
- (setq pt1(getpoint"\nFirst point:"))
- (setq pt2(getpoint"\nSecond point:"))
- (setq pt3(getpoint"\nThird point:"))
- (setq x1 (car pt1))
- (setq x2 (car pt2))
- (setq x3 (car pt3))
- (setq y1 (cadr pt1))
- (setq y2 (cadr pt2))
- (setq y3 (cadr pt3))
- (setq x (- x2 x1))
- (setq y (- y2 y1))
- (setq x4 (- x3 x))
- (setq y4 (- y3 y))
- (setq pt4 (list x4 y4))
- (command "pline" pt1 pt2 pt3 pt4 "c")
- )
- (defun c:clean()
- (Gc)
- )
- (defun c:dellayer()
- (setq l (strcase(getstring "\nEnter layer to delete:")))
- (setq e (entnext))
- (while e
- (if(= l (cdr(assoc 8 (entget e))))
- (entdel e)
- )
- (setq e (entnext e))
- )
- )
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;; DouKan;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun c:dk()
- (setq p (list 0 0))
- (command "insert" "c:/maped/lib/dk" p "" "" "")
- (setq pp (ssadd(entlast)))
- (command "erase" pp "")
- (setq ee (entsel "Select a DouKan ShangBianYuan:"))
- (setq e (car ee))
- (setq ppp (ssadd))
- (setq ppp ee)
- (command "measure" ppp "B""dk""y""1.5")
- )
- ;;;;;;;;;;;;;;;;;;;;;;;;;;; JiaGuDouKan;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun c:jgdk()
- (setq p (list 0 0))
- (command "insert" "c:/maped/lib/jg" p "" "" "")
- (setq pp (ssadd(entlast)))
- (command "erase" pp "")
- 8 (setq ee (entsel "Select a DouKan ShangBianYuan:"))
- (setq e (car ee))
- (setq ppp (ssadd))
- (setq ppp ee)
- (command "measure" ppp "B""jg""y""3")
- )
- (defun c:end (/ a)
- (setq a (getvar "cmdecho"))
- (setvar "cmdecho" 0)
- (initget "Yes No")
- (if (= (getkword "\nEND the drawing session? Yes/<No>: ") "Yes")
- (command "save" "" "quit" "y")
- (princ "\nYou must enter Yes to END a drawing session.")
- )
- (if a (setvar "cmdecho" a))
- 2 (princ)
- )
- ;;;;;;;;;;;;;;;;;;;;;;;;;;; XuanYa;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun c:xy()
- (setq p (list 0 0))
- (command "insert" "c:/maped/lib/g8" p "" "" "")
- (setq pp (ssadd(entlast)))
- (command "erase" pp "")
- (setq ee (entsel "XuanZe a XuanYa ShangBianYuan:"))
- (setq e (car ee))
- (setq ppp (ssadd))
- (setq ppp ee)
- (command "measure" ppp "B""g8""y""7.5")
- (princ)
- )
- ;;;;;;;;;;;;;;;;;;;;;;;;;;; XuanYa;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun c:dy()
- (command "layer" "m" "9553" "c" "1""""")
- (while (= bili nil)
- (setq bili (getint "\nEnter scale :"))
- )
- (setq p1 (getpoint "\nEnter first point :"))
- (setq p2 (getpoint "\nEnter second point :"))
- (setq dd(distance p1 p2))
- (setq ddd(* (/ dd bili) 1000))
- (while (<= ddd 3)
- (command "insert" "c:/maped/lib/gg3" p1 (/ dd 0.004) (getorient p1) """")
- )
- (while (<= ddd 10)
- (command "insert" "c:/maped/lib/g9" p1 (/ dd 0.004) (getorient p1) """")
- )
- (while (<= ddd 20)
- (command "insert" "c:/maped/lib/gg20" p1 (/ dd 0.004) (getorient p1) """")
- )
- (while (> ddd 20)
- (command "insert" "c:/maped/lib/gg30" p1 (/ dd 0.004) (getorient p1) """")
- )
- (princ1)
- )
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;; XiePo;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun c:xp()
- (princ "Select Top Line And Bottom Line Of XiePo !")
- (command "hatch" "triang""25""")
- )
- (defun c:a()
- (command "pline" "end")
- )
- (defun c:xyx()
- (setq p (list 0 0))
- (command "insert" "c:/maped/lib/xyx" p "" "" "")
- (setq pp (ssadd(entlast)))
- (command "erase" pp "")
- (setq ee (entsel "XuanZe a XuanYa ShangBianYuan:"))
- (setq e (car ee))
- (setq ppp (ssadd))
- (setq ppp ee)
- (command "measure" ppp "B""xyx""y""7.5")
- (princ)
- )
-
- (DEFUN S::STARTUP()
- (SETQ ENVV (GETENV "CAMEXE"))
- (IF (= ENVV nil) (SETQ ENVV "") (SETQ ENVV (STRCAT ENVV "\\")))
- (SETQ MENX ENVV)
- (SETQ ODOSNP 0 CCLAYER (GETVAR "CLAYER") ODPDM 0)
- (SETQ NAME (GETVAR "DWGNAME"))
- (SETQ NAME (STRCAT NAME ".ASC"))
- (setq bilichi 1000)
- (SETQ DTF (OPEN NAME "r"))
- (IF (/= DTF nil)
- (PROGN
- (SETQ BILICHI (ATOI (READ-LINE DTF)))
- (CLOSE DTF)
- )
- )
- (SETVAR "LTSCALE" BILICHI)
- (SETQ ENVV (STRCAT MENX "order"))
- (if(= (ads) nil) (XLOAD ENVV))
- (SETQ SYMV (GETENV "CAMLIB"))
- (IF (= SYMV nil) (SETQ SYMV "") (SETQ SYMV (STRCAT SYMV "\\")))
- (PRINC)
- (load "appload")
- )
-
- (DEFUN MYERROR (SMG)
- (COMMAND "OSNAP" "off")
- (COMMAND "LAYER" "S" CCLAYER "")
- (SETVAR "EXPERT" 1)
- (PRINC " ** ERROR ** ")
- (PRINC SMG)
- (SETQ *ERROR* SERROR)
- (PRINC)
- )
-
-
- (DEFUN LRDCHAR(MSG DCHAR CH / D)
- (IF (NOT DCHAR) (SETQ D "Y") (SETQ D DCHAR))
- (PRINC MSG)
- (IF(NOT CH) (SETQ CH CH)
- (PROGN
- (PRINC " (")
- (PRINC CH)
- (PRINC " )")
- )
- )
- (PRINC " <")
- (PRINC D)
- (PRINC ">:")
- (IF (NOT CH)
- (SETQ CCHAR (GETSTRING " "))
- (PROGN
- (INITGET 0 CH)
- (SETQ CCHAR (GETKWORD " "))
- )
- )
- (IF (OR (= CCHAR "") (NOT CCHAR)) (SETQ CCHAR D))
- )
-
- (DEFUN C:tbcover()
- (SETQ ENVV (STRCAT MENX "cover"))
- (XLOAD ENVV)
- (C:cover)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:cal()
- (SETQ ENVV (STRCAT MENX "cal"))
- (XLOAD ENVV)
- (C:cal)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:itematch()
- (SETQ ENVV (STRCAT MENX "itematch"))
- (XLOAD ENVV)
- (C:itematch)
- (princ)
- )
- (DEFUN C:prematch()
- (SETQ ENVV (STRCAT MENX "prematch"))
- (XLOAD ENVV)
- (setq retval (C:pre))
- (if (= retval nil) (setq retval 0))
- (xunload ENVV)
- (if (= retval 2) (command "quit" "y"))
- (princ)
- )
- (DEFUN C:cleanx()
- (SETQ ENVV (STRCAT MENX "cleanx"))
- (XLOAD ENVV)
- (C:cleanxy)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:mpdarc()
- (SETQ ENVV (STRCAT MENX "arcinfor"))
- (XLOAD ENVV)
- (C:arcinfor)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:postmtch()
- (SETQ ENVV (STRCAT MENX "postmtch"))
- (XLOAD ENVV)
- (setq retval (C:post))
- (if (= retval nil) (setq retval 0))
- (xunload ENVV)
- (if (= retval 1) (command "quit" "y"))
- (princ)
- )
- (DEFUN C:lineSYM()
- (SETQ ENVV (STRCAT MENX "linet"))
- (XLOAD ENVV)
- (C:LINET)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:LM()
- (SETQ ENVV (STRCAT MENX "linet"))
- (XLOAD ENVV)
- (C:LINET)
- (XUNLOAD ENVV)
- (PRINC)
- )
- (DEFUN C:L_SYM_T()
- (SETQ ENVV (STRCAT MENX "linett"))
- (XLOAD ENVV)
- (C:LINETT)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:SMOOTH()
- (SETQ ENVV (STRCAT MENX "linet"))
- (XLOAD ENVV)
- (C:autospl)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:SML()
- (SETQ ENVV (STRCAT MENX "linet"))
- (XLOAD ENVV)
- (C:pk_point)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:JXINPUT()
- (SETQ ENVV (STRCAT MENX "dwgtrf"))
- (XLOAD ENVV)
- (C:TRANSF)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:AUTOMTCH()
- (SETQ ENVV (STRCAT MENX "autojb"))
- (XLOAD ENVV)
- (C:AUTOJB)
- (princ)
- )
- (DEFUN C:P&TEXT()
- (SETQ ENVV (STRCAT MENX "hs_list"))
- (XLOAD ENVV)
- (C:p&text)
- (princ)
- )
- (DEFUN C:HS_list()
- (SETQ ENVV (STRCAT MENX "hs_list"))
- (XLOAD ENVV)
- (C:hs_list)
- (princ)
- )
- (DEFUN C:hs_coor()
- (SETQ ENVV (STRCAT MENX "hs_list"))
- (XLOAD ENVV)
- (C:hs_coor)
- (princ)
- )
- (DEFUN C:XSQUARE()
- (SETQ ENVV (STRCAT MENX "AUTOGFW"))
- (XLOAD ENVV)
- (C:AUTOGFW)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:STD_OUT()
- (SETQ ENVV (STRCAT MENX "STD_OUT"))
- (XLOAD ENVV)
- (C:STD_OUT)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:STD_IN()
- (SETQ ENVV (STRCAT MENX "STD_IN"))
- (XLOAD ENVV)
- (C:STD_IN)
- (XUNLOAD ENVV)
- (princ)
- )
- (DEFUN C:SET2()
- (SETQ ENVV (STRCAT MENX "SET2"))
- (XLOAD ENVV)
- (C:SET2)
- )
- (DEFUN C:QMTCH()
- (C:QAUTOJB)
- (XUNLOAD ENVV)
- (COMMAND "QUIT" "Y")
- )
- (DEFUN C:FDEM()
- (SETQ ENVV (STRCAT MENX "FFDEM"))
- (XLOAD ENVV)
- (C:FDEM)
- (princ)
- )
- (DEFUN C:DPTIN()
- (SETQ ENVV (STRCAT MENX "FFDEM"))
- (XLOAD ENVV)
- (C:DPTIN)
- (princ)
- )
- (DEFUN C:ADJUST()
- (SETQ ENVV (STRCAT MENX "RELE"))
- (LOAD ENVV)
- (C:ADJUST)
- (princ)
- )
- (DEFUN C:HOUSTCH()
- (SETQ ENVV (STRCAT MENX "TANG"))
- (XLOAD ENVV)
- (C:HOUSTCH)
- (princ)
- )
-
- (DEFUN C:movela()
- (SETQ ENVV (STRCAT MENX "mpd_zhng"))
- (XLOAD ENVV)
- (C:movela)
- (princ)
- )
-
- (DEFUN C:mergela()
- (SETQ ENVV (STRCAT MENX "mpd_zhng"))
- (XLOAD ENVV)
- (C:mergela)
- (princ)
- )
-
- (DEFUN C:SINSRT()
- (SETQ ENVV (STRCAT MENX "TANG"))
- (XLOAD ENVV)
- (C:SINSRT)
- (princ)
- )
- (DEFUN C:MINSRT()
- (SETQ ENVV (STRCAT MENX "TANG"))
- (XLOAD ENVV)
- (C:MINSRT)
- (princ)
- )
- (DEFUN C:AREADIM()
- (SETQ ENVV (STRCAT MENX "TANG"))
- (XLOAD ENVV)
- (C:AREADIM)
- (princ)
- )
- (DEFUN C:AREASYM()
- (SETQ ENVV (STRCAT MENX "TANG"))
- (XLOAD ENVV)
- (C:AREASYM)
- (princ)
- )
- (DEFUN C:SYMSYM()
- (command "VSLIDE" (strcat symv "SYM"))
- (princ)
- )
-
- (DEFUN C:SYM123T()
- (command "VSLIDE" (strcat symv "123T"))
- (princ)
- )
-
- (DEFUN C:SYMC()
- (command "VSLIDE" (strcat symv "C"))
- (princ)
- )
-
- (DEFUN C:SYMHS()
- (command "VSLIDE" (strcat symv "HS"))
- (princ)
- )
-
- (DEFUN C:SYMI()
- (command "VSLIDE" (strcat symv "I"))
- (princ)
- )
- (DEFUN C:SYMO()
- (command "VSLIDE" (strcat symv "O"))
- (princ)
- )
- (DEFUN C:SYMPR()
- (command "VSLIDE" (strcat symv "PR"))
- (princ)
- )
- (DEFUN C:SYMVG()
- (command "VSLIDE" (strcat symv "VG"))
- (princ)
- )
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun C:fe(/ ZP X XX AP)
- (while (= BILI nil)
- (setq BILI (getreal "Input scale parameter:"))
- )
- (command "layer" "m" "9212" "c" "32""""")
- (setq zp (getpoint "Input Point Position , Please !"))
- (setq z1 (car zp))
- (setq z2 (cdr zp))
- (setq zp1 (cons z1 z2))
- (command "insert" "c:/maped/lib/aa" zp1 (* 2.5 bili) """")
- (setq x (car zp))
- (setq xx (+ x (* bili 0.001)))
- (setq ap (subst xx x zp))
- (command "text" "j" "ml" ap (* bili 0.002) 0 )
- (princ)
- )
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (defun c:1300()
- (command "layer" "m" "1300" "c" "3""""")
- )
- (defun c:8615()
- (command "layer" "m" "8615" "c" "3""""")
- )
- (defun c:8610()
- (command "layer" "m" "8610" "c" "3""""")
- )
- (defun c:2100()
- (command "layer" "m" "2100" "c" "1""""")
- )
- (defun c:2440()
- (command "layer" "m" "2440" "c" "1""""")
- )
- (defun c:9120()
- (command "layer" "m" "9120" "c" "2""""")
- )
- (defun c:9110()
- (command "layer" "m" "9110" "c" "7""""")
- )
- (defun c:zdm1()
- (while (= bili nil)
- (setq bili (getint "输入横比例尺:"))
- (setq biliv (getint "输入纵比例尺:"))
- )
- (setq kk (/ bili biliv))
- (setq loop "y")
- (while (= loop "y")
- (setq xy (getpoint "输入累距和高程 S,H !:"))
- (setq s (car xy))
- (setq h (cadr xy))
- (setq h (* h kk))
- (setq xy (list s h))
- (command "layer" "m" "dm" "c" "5""""")
- (command "insert" "c:/maped/lib/p2" xy bili """")
- (while (> s 0)
- (command "line" xy0 xy "")
- (setq s 0)
- )
- (setq xy0 xy)
- )
- (prin1)
- )
-
- (defun c:sectionv()
- (while (= bilih nil)
- (setq bilih (getint "输入断面图的横比例尺: "))
- )
- (while (= biliv nil)
- (setq biliv (getint "输入断面图的纵比例尺: "))
- )
- (setq scale (/ bilih biliv))
- (setq j 0)
- (setq sum 0)
- (setq xg "n")
- (setq xg (getstring "\n要修改错误吗 ? :(Y/N)"))
- (if (= xg "y") (progn
- (setq j 10)
- (setq sum (- sum s1))
- )
- )
- (setq loop "y")
- (while (= loop "y")
- (setq xy (getpoint "\n输入断面点的坐标--X,Y !"))
- (setq H (getreal "\n输入断面点的高程--H !"))
- (if (= j 0)
- (setq xy0 xy)
- )
- (setq s1 (distance xy xy0))
- (setq xy0 xy)
- (setq sum (+ sum s1))
- (setq xyz (list sum (* h scale)))
- (command "layer" "m" "dm" "c" "5""""")
- (if (/= xg "y") (progn
- (command "insert" "c:/maped/lib/p2" xyz bilih """")
- (if (/= j 0)
- (command "line" xyz0 xyz "")
- )
- )
- )
- (setq xg "n")
- (setq j 10)
- (setq xyz0 xyz)
- )
- (prin1)
- )
- (defun c:bzt()
- (while (= bilih nil)
- (setq bilih (getint "\n输入断面图的比例尺: "))
- )
- (setq loop "y")
- (setq j 0)
- (while (= loop "y")
- (command "layer" "m" "dm" "c" "5""""")
- (setq l1 (getstring "\n输入纵断面点点号 : "))
- (setq xy (getpoint "\n输入纵断面点的坐标--X,Y !"))
- (setq bb 0)
- (setq bx (getstring "\n没有横断面吗 ?大写Y/<N> :"))
- (if (/= bx "Y") (progn
- (setq bb (getreal "\n输入方位角 :"))
- (setq bb (* bb (/ 3.1415926 180)))
- )
- )
- (setq x (car xy))
- (setq y (cadr xy))
- (setq x1 (- x (* 100 (cos bb))))
- (setq y1 (- y (* 100 (sin bb))))
- (setq x2 (+ x (* 100 (cos bb))))
- (setq y2 (+ y (* 100 (sin bb))))
- (setq xy1 (list y1 x1))
- (setq xy2 (list y2 x2))
- (setq xy (list y x))
- (if (/= j 0)
- (command "line" xy0 xy "")
- )
- (if (/= bb 0)
- (command "line" xy1 xy2 "")
- )
- (setq zp (list (+ y (* 0.003 bilih)) x))
- (command "insert" "c:/maped/lib/p2" xy bilih """")
- (command "layer" "m" "zj" "c" "1""""")
- (command "text" "j" "mc" zp (* bilih 0.002) 0 l1)
- (setq j 10)
- (setq xy0 xy)
- )
- (prin1)
- )
- (defun c:dtk()
- (command "layer" "m" "dtk" "c" "7""""")
- )
- (defun c:dkz()
- (command "layer" "m" "dkz" "c" "1""""")
- )
- (defun c:zb()
- (command "layer" "m" "zb""")
- (while (= bili nil)
- (setq bili (getreal "\n输入成图比例尺分母 :"))
- )
- (setq tf5 (getstring "\n是50×50的图幅吗? 输入Y或N :"))
- (setq xxx 0.003)
- (setq yyy 0.0018)
- (setq hv "v")
- (setq dh 0)
- (setq daihao (getstring "\有带号吗? 输入Y或N :"))
- (if (= daihao "y")
- (setq dh (getreal "\n输入带号 :"))
- )
- (setq xybl (getpoint "\n输入图幅在CAD中的西南角坐标y,x :"))
- (setq hv (getstring "\n图幅是横向<H>或是纵向<V>? :"))
- (setq y0 (+ (car xybl) (* dh 1e6)))
- (setq x0 (cadr xybl))
- (setq ybl (car xybl))
- (setq xbl (cadr xybl))
- (setq lo 1)
- (setq bl 1)
- (setq cs 0.4)
- (if (= tf5 "y") (setq cs 0.5))
- (if (< bili 1000) (setq bl 2))
- (while (<= lo 4)
- (setq cx 1)
- (setq cy 1)
- (if (or (= lo 1) (= lo 4)) (setq cx 0))
- (if (or (= lo 2) (= lo 1)) (setq cy 0))
- (if (= hv "v") (progn
- (setq xz (+ (* (* 0.5 cx) bili) x0))
- (setq yz (+ (* (* cs cy) bili) y0))
- (setq y (+ (* (* 0.5 cx) bili) xbl))
- (setq x (+ (* (* cs cy) bili) ybl))
- )
- )
- (if (= hv "h") (progn
- (setq xz (+ (* (* cs cx) bili) x0))
- (setq yz (+ (* (* 0.5 cy) bili) y0))
- (setq y (+ (* (* cs cx) bili) xbl))
- (setq x (+ (* (* 0.5 cy) bili) ybl))
- )
- )
- (setq xz (fix xz))
- (setq yz (fix yz))
- (setq xz (itoa xz))
- (setq yz (itoa yz))
- (setq xz1 " ")
- (setq yz1 " ")
- (setq xln (strlen xz))
- (setq yln (strlen yz))
- (if ( > xln 5) ( progn
- (setq xz1 (substr xz 1 (- xln 5)))
- (setq xz2 (substr xz (- xln 4) 2))
- (setq xz3 (substr xz (- xln 2) bl))
- ) ;end progn else
- ( progn
- (setq xz2 (substr xz 1 (- xln 3)))
- (setq xz3 (substr xz (- xln 2) bl))
- )
- )
- (setq xz2 (strcat xz2 "." xz3))
- (if ( > yln 5) ( progn
- (setq yz1 (substr yz 1 (- yln 5)))
- (setq yz2 (substr yz (- yln 4) 2))
- (setq yz3 (substr yz (- yln 2) bl))
- ); end progn else
- ( progn
- (setq yz2 (substr yz 1 (- yln 3)))
- (setq yz3 (substr yz (- yln 2) bl))
- )
- )
- (setq yz2 (strcat yz2 "." yz3))
- (setq x1 (- x (* bili (+ 0.0042 (* 0.00135 (strlen yz1))))))
- (setq x2 (- x (* bili 0.0042)))
- (setq x3 (- x (* bili (+ (* 0.00225 (- (strlen xz2) 1)) (* 0.00135 (strlen xz1))))))
- (setq x3 (+ x3 (* bili 0.0001)))
- (setq x4 (- x (* bili (* 0.00225 (- (strlen xz2) 1)))))
- (if ( or (= lo 3) (= lo 4)) ( progn
- (setq x3 (+ x (* bili 0.0002)))
- (setq x3 (+ x3 (* bili 0.0001)))
- (setq x4 (+ x (* bili (+ (* (strlen xz1) 0.00135) 0.0002))))
- )
- )
- (setq yy 0.012)
- (if (>= bili 5000) (setq yy 0.0095))
- (setq y1 (- y (* bili (- yy 0.003))))
- (setq y2 (- y (* bili (- yy 0.0024))))
- (setq y3 (+ y (* bili 0.0027)))
- (setq y4 (+ y (* bili 0.0021)))
- (if (or ( = lo 2) (= lo 3)) (progn
- (setq y1 (+ y (* bili (- yy 0.0018))))
- (setq y2 (+ y (* bili (- yy 0.0024))))
- )
- )
- (setq pylx 0.0004)
- (setq pyld 0.0009)
- (if (or (= lo 1) (= lo 2)) (progn
- (setq pylx 0)
- (setq pyld 0.0004)
- )
- )
- (setq xy1 (list x1 y1))
- (setq xy2 (list x2 y2))
- (setq xy3 (list (- x3 (* pylx bili)) y3))
- (setq xy4 (list (- x4 (* pyld bili)) y4))
- (command "text" "j" "ml" xy1 (* bili yyy) 0 yz1)
- (command "text" "j" "ml" xy2 (* bili xxx) 0 yz2)
- (command "text" "j" "ml" xy3 (* bili yyy) 0 xz1)
- (command "text" "j" "ml" xy4 (* bili xxx) 0 xz2)
- (setq lo (+ lo 1))
- )
- (setq loop "y")
- (setq zjg 3)
- (if (= tf5 "y") (setq zjg 4))
- (while (and (>= bili 5000) (= loop "y"))
- (setq lo 1)
- (setq cx10 (* bili 0.1))
- (if (= hv "v") (progn
- (setq zx 4)
- (setq zy zjg)
- )
- )
- (if (= hv "h") (progn
- (setq zx zjg)
- (setq zy 4)
- )
- )
- (while (<= lo zy)
- (setq yz5 (+ y0 (* cx10 lo)))
- (setq x (- (+ ybl (* cx10 lo)) 21))
- (setq yz5 (fix yz5))
- (setq yz5 (itoa yz5))
- (setq ly (strlen yz5))
- (setq y1 (substr yz5 (- ly 4) 2))
- (setq y2 (substr yz5 (- ly 2) 1))
- (setq yz (strcat y1 "." y2))
- (setq yx (- xbl 35.5))
- (setq ys (+ xbl (+ 35.5 (* cx10 (+ zx 1)))))
- (setq y10 (list x yx))
- (setq y9 (list x ys))
- (command "text" "j" "ml" y10 (* bili xxx) 0 yz)
- (command "text" "j" "ml" y9 (* bili xxx) 0 yz)
- (setq lo (+ lo 1))
- )
- (setq lo 1)
- (while (<= lo zx)
- (setq xz5 (+ x0 (* cx10 lo)))
- (setq y (+ (+ xbl (* cx10 lo)) 10.5))
- (setq xz5 (fix xz5))
- (setq xz5 (itoa xz5))
- (setq ly (strlen xz5))
- (setq y1 (substr xz5 (- ly 4) 2))
- (setq y2 (substr xz5 (- ly 2) 1))
- (setq xz (strcat y1 "." y2))
- (setq xl (- ybl 39))
- (setq xr (+ ybl (+ 6 (* cx10 (+ zy 1)))))
- (setq x10 (list xl y))
- (setq x9 (list xr y))
- (command "text" "j" "ml" x10 (* bili xxx) 0 xz)
- (command "text" "j" "ml" x9 (* bili xxx) 0 xz)
- (setq lo (+ lo 1))
- )
- (setq loop "n")
- )
- (princ)
- )
-
- (defun c:8613()
- (command "layer" "m" "8613" "c" "3""""")
- )
- (defun c:8611()
- (command "layer" "m" "8611" "c" "3""""")
- )
- (defun c:8612()
- (command "layer" "m" "8612" "c" "3""""")
- )
- (defun c:9111()
- (command "layer" "m" "9111" "c" "7""""")
- )
- (defun c:9121()
- (command "layer" "m" "9121" "c" "2""""")
- )
- (defun c:zj1(/ name ename ee e pl elev0 xy1 x1 y1 a aa ang elev1 txt)
- (command "layer" "m" "9121-sym" "c" "1""""")
- ;(SETQ BILI nil)
- (while (= BILI nil)
- (setq BILI (getint "Input scale parameter:"))
- )
- (setq name nil)
- (while (not(or (= name "LINE")(= name "POLYLINE")))(progn
- (setq ename nil)
- (setq ee (entsel "Select a DengGaoXian:"))
- (setq e (car ee))
- (if e(progn
- (setq pl (entget e))
- (SETQ ELEV0 (caddr(cdr(assoc 10 pl))))
- (setq name (cdr(assoc 0 pl)))
- (setq ename e)
- (if(or(= name "LINE")(= name "POLYLINE"))(progn
- (princ(strcat "\n"name"selected\n"))
- );end progn else
- (progn (princ "\nThat's not a DengGaoXian,it's a ")(princ name)(princ "\n"))
- );end if
- );end progn
- ;else
- (princ "\nNothing Selected\n")
- );end if
- ));end while
- (setq xy1 (car(cdr ee)))
- (setq x1 (car xy1))
- (setq y1 (car(cdr xy1)))
- (setq a(list x1 y1 0))
- (setq aa(list x1 y1))
- (setq ang nil)
- (while (= ang nil)
- (setq ang (getangle aa "Select Second Point:"))
- )
- (princ (strcat "\nInput elev<" (rtos elev0) ">"))
- (setq ELEV1 (getreal))
- (if (not elev1) (setq elev1 elev0))
- (setq ang (* ang 57.2958))
- (setq txt (itoa (fix elev1)))
- (command "layer" "m" "9121-SYM""")
- (command "text" "j" "ml" a (* bili 0.002) ang txt)
- (princ)
- )
- (defun c:zb1()
- (command "layer" "m" "zb""")
- (while (= bili nil)
- (setq bili (getreal "\n输入成图比例尺分母 :"))
- )
- (setq tf5 (getstring "\n是50×50的图幅吗? 输入Y或N :"))
- (setq xxx 0.003)
- (setq yyy 0.0018)
- (setq hv "v")
- (setq dh 0)
- (setq daihao (getstring "\有带号吗? 输入Y或N :"))
- (if (= daihao "y")
- (setq dh (getreal "\n输入带号 :"))
- )
- (setq xybl (getpoint "\n输入图幅在CAD中的西南角坐标y,x :"))
- (setq hv (getstring "\n图幅是横向<H>或是纵向<V>? :"))
- (setq y0 (+ (car xybl) (* dh 1e6)))
- (setq x0 (cadr xybl))
- (setq ybl (car xybl))
- (setq xbl (cadr xybl))
- (setq lo 1)
- (setq bl 1)
- (setq cs 0.4)
- (if (= tf5 "y") (setq cs 0.5))
- (if (< bili 1000) (setq bl 2))
- (while (<= lo 4)
- (setq cx 1)
- (setq cy 1)
- (if (or (= lo 1) (= lo 4)) (setq cx 0))
- (if (or (= lo 2) (= lo 1)) (setq cy 0))
- (if (= hv "v") (progn
- (setq xz (+ (* (* 0.5 cx) bili) x0))
- (setq yz (+ (* (* cs cy) bili) y0))
- (setq y (+ (* (* 0.5 cx) bili) xbl))
- (setq x (+ (* (* cs cy) bili) ybl))
- )
- )
- (if (= hv "h") (progn
- (setq xz (+ (* (* cs cx) bili) x0))
- (setq yz (+ (* (* 0.5 cy) bili) y0))
- (setq y (+ (* (* cs cx) bili) xbl))
- (setq x (+ (* (* 0.5 cy) bili) ybl))
- )
- )
- (setq xz (fix xz))
- (setq yz (fix yz))
- (setq xz (itoa xz))
- (setq yz (itoa yz))
- (setq xz1 " ")
- (setq yz1 " ")
- (setq xln (strlen xz))
- (setq yln (strlen yz))
- (if ( > xln 5) ( progn
- (setq xz1 (substr xz 1 (- xln 5)))
- (setq xz2 (substr xz (- xln 4) 2))
- (setq xz3 (substr xz (- xln 2) bl))
- ) ;end progn else
- ( progn
- (setq xz2 (substr xz 1 (- xln 3)))
- (setq xz3 (substr xz (- xln 2) bl))
- )
- )
- (setq xz2 (strcat xz2 ))
- (if ( > yln 5) ( progn
- (setq yz1 (substr yz 1 (- yln 5)))
- (setq yz2 (substr yz (- yln 4) 2))
- (setq yz3 (substr yz (- yln 2) bl))
- ); end progn else
- ( progn
- (setq yz2 (substr yz 1 (- yln 3)))
- (setq yz3 (substr yz (- yln 2) bl))
- )
- )
- (setq yz2 (strcat yz2 ))
- (setq x1 (- x (* bili (+ 0.0042 (* 0.00135 (strlen yz1))))))
- (setq x2 (- x (* bili 0.0042)))
- (setq x3 (- x (* bili (+ (* 0.00225 (- (strlen xz2) 1)) (* 0.00135 (strlen xz1))))))
- (setq x3 (+ x3 (* bili 0.0001)))
- (setq x4 (- x (* bili (* 0.00225 (- (strlen xz2) 1)))))
- (if ( or (= lo 3) (= lo 4)) ( progn
- (setq x3 (+ x (* bili 0.0002)))
- (setq x3 (+ x3 (* bili 0.0001)))
- (setq x4 (+ x (* bili (+ (* (strlen xz1) 0.00135) 0.0002))))
- )
- )
- (setq yy 0.012)
- (if (> bili 5000) (setq yy 0.008))
- (setq y1 (- y (* bili (- yy 0.003))))
- (setq y2 (- y (* bili (- yy 0.0024))))
- (setq y3 (+ y (* bili 0.0027)))
- (setq y4 (+ y (* bili 0.0021)))
- (if (or ( = lo 2) (= lo 3)) (progn
- (setq y1 (+ y (* bili (- yy 0.0018))))
- (setq y2 (+ y (* bili (- yy 0.0024))))
- )
- )
- (setq pylx 0.0004)
- (setq pyld 0.0009)
- (if (or (= lo 1) (= lo 2)) (progn
- (setq pylx 0)
- (setq pyld 0.0004)
- )
- )
- (setq xy1 (list (+ x1 40) y1))
- (setq xy2 (list (+ x2 40) y2))
- (if (or (= lo 1) (= lo 2)) (progn
- (setq xy3 (list (- (- x3 (* pylx bili)) 20) y3))
- (setq xy4 (list (- (- x4 (* pyld bili)) 20) y4))
- )
- )
- (if (or (= lo 3) (= lo 4)) (progn
- (setq xy3 (list (+ (- x3 (* pylx bili)) 10) y3))
- (setq xy4 (list (+ (- x4 (* pyld bili)) 10) y4))
- )
- )
-
- (command "text" "j" "ml" xy1 (* bili yyy) 0 yz1)
- (command "text" "j" "ml" xy2 (* bili xxx) 0 yz2)
- (command "text" "j" "ml" xy3 (* bili yyy) 0 xz1)
- (command "text" "j" "ml" xy4 (* bili xxx) 0 xz2)
- (setq lo (+ lo 1))
- )
- (setq loop "y")
- (setq zjg 3)
- (if (= tf5 "y") (setq zjg 4))
- (while (and (> bili 5000) (= loop "y"))
- (setq lo 1)
- (setq cx10 (* bili 0.1))
- (if (= hv "v") (progn
- (setq zx 4)
- (setq zy zjg)
- )
- )
- (if (= hv "h") (progn
- (setq zx zjg)
- (setq zy 4)
- )
- )
- (while (<= lo zy)
- (setq yz5 (+ y0 (* cx10 lo)))
- (setq x (- (+ ybl (* cx10 lo)) 0))
- (setq yz5 (fix yz5))
- (setq yz5 (itoa yz5))
- (setq ly (strlen yz5))
- (setq y1 (substr yz5 (- ly 4) 2))
- (setq y2 (substr yz5 (- ly 2) 1))
- (setq yz (strcat y1 ))
- (setq yx (- xbl 50.5))
- (setq ys (+ xbl (+ 50.5 (* cx10 (+ zx 1)))))
- (setq y10 (list x yx))
- (setq y9 (list x ys))
- (command "text" "j" "ml" y10 (* bili xxx) 0 yz)
- (command "text" "j" "ml" y9 (* bili xxx) 0 yz)
- (setq lo (+ lo 1))
- )
- (setq lo 1)
- (while (<= lo zx)
- (setq xz5 (+ x0 (* cx10 lo)))
- (setq y (+ (+ xbl (* cx10 lo)) 20.5))
- (setq xz5 (fix xz5))
- (setq xz5 (itoa xz5))
- (setq ly (strlen xz5))
- (setq y1 (substr xz5 (- ly 4) 2))
- (setq y2 (substr xz5 (- ly 2) 1))
- (setq xz (strcat y1 ))
- (setq xl (- ybl 59))
- (setq xr (+ ybl (+ 6 (* cx10 (+ zy 1)))))
- (setq x10 (list xl y))
- (setq x9 (list xr y))
- (command "text" "j" "ml" x10 (* bili xxx) 0 xz)
- (command "text" "j" "ml" x9 (* bili xxx) 0 xz)
- (setq lo (+ lo 1))
- )
- (setq loop "n")
- )
- (princ)
- )
- (defun c:posd();展地形点
- (setq f (strcase(getstring "\n输入文件名:")))
- (if ( = (findfile f) nil)
- (progn
- (print "Bad file name !")
- (quit)
- )
- (progn
- (setq a (open f "r"))
- )
- )
- (setq BILICHI (getreal "输入成图比例尺:"))
- (setq ws (getint"高程点位数:"))
- (setq c (read-line a))
- (while (/= c nil)
- (progn
- (setq L (strlen c))
- (SETQ CN 1)
- (SETQ CM 1)
- (SETQ D NIL)
- (while (< cn L)
- (if(= (substr c cn 1) ",")
- (PROGN
- (if (= cm 1) (setq c1 cn))
- (if (= cm 2) (setq c2 cn))
- (if (= cm 3) (setq c3 cn))
- (if (= cm 4) (setq c4 cn))
- (SETQ CM (+ CM 1))
- )
- )
- (SETQ CN (+ CN 1))
- )
- (setq pn (substr c 1 (- c1 1)))
- (setq x (atof(substr c (+ c1 1) (- c2 1))))
- (setq y (atof(substr c (+ c2 1) (- c3 1))))
- (setq z (atof(substr c (+ c3 1) l)))
- (setq zz ( atof(substr c (+ c3 1) l)))
- (if (= 1 ws) (setq zz4 (* zz 10)))
- (if (= 2 ws) (setq zz4 (* zz 100)))
- (setq zz5 (itoa(fix zz4)))
- (setq cd2 (strlen zz5))
- (setq zz1 (substr zz5 1 (- cd2 ws)))
- (setq zz2 (substr zz5 (+ (- cd2 ws) 1) ws))
- (setq zz6 (strcat zz1 "." zz2))
- (setq xyz (list y x z))
- (command "layer" "m" "dxd" "c" "7""""")
- (command "insert" "c:/maped/lib/aa" xyz bilichi ""0)
- (setq yy (+ y (* bilichi 0.0003)))
- (setq xyzc (list (+ yy (* bilichi 0.0015 )) x z))
- (command "text" "j" "ml" xyzc (* bilichi 0.002)"0" zz6)
- (setq xyzz (list (+ yy (* bilichi 0.0015 )) (- x (* bilichi 0.003)) z))
- (command "layer" "m" "dm" "c" "3""""")
- (command "text" "j" "ml" xyzz (* bilichi 0.002)"0" pn)
- )
- (setq c (read-line a))
- )
- (PRIN1)
- )
-
- (defun c:hdm();展断面点
- (setq f (strcase(getstring "\n输入文件名:")))
- (if ( = (findfile f) nil)
- (progn
- (print "Bad file name !")
- (quit)
- )
- (progn
- (setq a (open f "r"))
- )
- )
- (setq bilichi (getint "输入横比例尺:"))
- (setq biliv (getint "输入纵比例尺:"))
- (setq kk (/ bilichi biliv))
- (setq ws (getint"高程点位数:"))
- (setq c (read-line a))
- (while (/= c nil)
- (progn
- (setq L (strlen c))
- (SETQ CN 1)
- (SETQ CM 1)
- (SETQ D NIL)
- (while (< cn L)
- (if(= (substr c cn 1) ",")
- (PROGN
- (if (= cm 1) (setq c1 cn))
- (if (= cm 2) (setq c2 cn))
- (if (= cm 3) (setq c3 cn))
- (if (= cm 4) (setq c4 cn))
- (SETQ CM (+ CM 1))
- )
- )
- (SETQ CN (+ CN 1))
- )
- (setq pn (substr c 1 (- c1 1)))
- (setq x (atof(substr c (+ c1 1) (- c2 1))))
- (setq y (atof(substr c (+ c2 1) (- c3 1))))
- (setq z (atof(substr c (+ c3 1) l)))
- (setq zz ( atof(substr c (+ c3 1) l)))
- (if (= 1 ws) (setq zz4 (* zz 10)))
- (if (= 2 ws) (setq zz4 (* zz 100)))
- (setq zz5 (itoa(fix zz4)))
- (setq cd2 (strlen zz5))
- (setq zz1 (substr zz5 1 (- cd2 ws)))
- (setq zz2 (substr zz5 (+ (- cd2 ws) 1) ws))
- (setq zz6 (strcat zz1 "." zz2))
- (setq yyy (* kk y))
- (setq xyz (list x yyy z))
- (command "layer" "m" "dxd" "c" "5""""")
- (command "insert" "c:/maped/lib/p2" xyz bilichi ""0)
- (setq yy (+ yyy (* bilichi 0.0003)))
- (setq xyzc (list x (+ yyy (* bilichi 0.0015 )) z))
- (command "layer" "m" "dm" "c" "7""""")
- (command "text" "j" "ml" xyzc (* bilichi 0.002)"0" pn)
- )
- (setq c (read-line a))
- )
- (PRIN1)
- )
- (defun c:zdm();展断面点
- (setq f (strcase(getstring "\n输入文件名:")))
- (if ( = (findfile f) nil)
- (progn
- (print "Bad file name !")
- (quit)
- )
- (progn
- (setq a (open f "r"))
- )
- )
- (setq bilichi (getint "输入横比例尺:"))
- (setq biliv (getint "输入纵比例尺:"))
- (setq qsg (getint "输入起始高程:"))
- (setq kk (/ bilichi biliv))
- (setq qsgg (* kk qsg))
- (setq ws (getint"高程点位数:"))
- (setq c (read-line a))
- (while (/= c nil)
- (progn
- (setq L (strlen c))
- (SETQ CN 1)
- (SETQ CM 1)
- (SETQ D NIL)
- (while (< cn L)
- (if(= (substr c cn 1) ",")
- (PROGN
- (if (= cm 1) (setq c1 cn))
- (if (= cm 2) (setq c2 cn))
- (if (= cm 3) (setq c3 cn))
- (if (= cm 4) (setq c4 cn))
- (SETQ CM (+ CM 1))
- )
- )
- (SETQ CN (+ CN 1))
- )
- (setq pn (substr c 1 (- c1 1)))
- (setq x (atof(substr c (+ c1 1) (- c2 1))))
- (setq y (atof(substr c (+ c2 1) (- c3 1))))
- (setq z (atof(substr c (+ c3 1) l)))
- (setq zz ( atof(substr c (+ c3 1) l)))
- (if (= 1 ws) (setq zz4 (* y 10)))
- (if (= 2 ws) (setq zz4 (* y 100)))
- (setq zz5 (itoa(fix zz4)))
- (setq cd2 (strlen zz5))
- (setq zz1 (substr zz5 1 (- cd2 ws)))
- (setq zz2 (substr zz5 (+ (- cd2 ws) 1) ws))
- (setq zz6 (strcat zz1 "." zz2))
- (setq yyy (* kk y))
- (setq xyz (list x yyy z))
- (command "layer" "m" "dxd" "c" "5""""")
- (command "insert" "c:/maped/lib/p2" xyz bilichi ""0)
- (setq yy (+ yyy (* bilichi 0.0003)))
- (setq xyzc (list x (+ yyy (* bilichi 0.0015 )) z))
- (command "layer" "m" "dm" "c" "7""""")
- (command "text" "j" "ml" xyzc (* bilichi 0.002)"0" pn)
- (setq x99 (list x (+ qsgg (* (- 0 0.035) bilichi))))
- (setq y99 (list x (+ qsgg (* (- 0 0.0345) bilichi))))
- (command "line" x99 y99 "")
- (setq x99 (list x (+ qsgg (* (- 0 0.0195) bilichi))))
- (setq y99 (list x (+ qsgg (* (- 0 0.0205) bilichi))))
- (command "line" x99 y99 "")
- (setq x99 (list x (+ qsgg (* (- 0 0.0105) bilichi))))
- (setq y99 (list x (+ qsgg (* (- 0 0.010) bilichi))))
- (command "line" x99 y99 "")
- (setq y99 (list x (+ qsgg (* (- 0 0.0335) bilichi))))
- (command "text" "j" "ml" y99 (* bilichi 0.003)"90" zz6)
- (setq y99 (list x (+ qsgg (* (- 0 0.0185) bilichi))))
- (command "text" "j" "ml" y99 (* bilichi 0.003)"90" pn)
- )
- (setq c (read-line a))
- )
- (PRIN1)
- )
- (defun c:fft();展地形点
- (setq f (strcase(getstring "\n输入文件名:")))
- (if ( = (findfile f) nil)
- (progn
- (print "Bad file name !")
- (quit)
- )
- (progn
- (setq a (open f "r"))
- )
- )
- (setq BILICHI (getreal "输入成图比例尺:"))
- (setq ws (getint"高程点位数:"))
- (setq c (read-line a))
- (while (/= c nil)
- (progn
- (setq L (strlen c))
- (SETQ CN 1)
- (SETQ CM 1)
- (SETQ D NIL)
- (while (< cn L)
- (if(= (substr c cn 1) ",")
- (PROGN
- (if (= cm 1) (setq c1 cn))
- (if (= cm 2) (setq c2 cn))
- (if (= cm 3) (setq c3 cn))
- (if (= cm 4) (setq c4 cn))
- (SETQ CM (+ CM 1))
- )
- )
- (SETQ CN (+ CN 1))
- )
- (setq pn (substr c 1 (- c1 1)))
- (setq x (atof(substr c (+ c1 1) (- c2 1))))
- (setq y (atof(substr c (+ c2 1) (- c3 1))))
- (setq z (atof(substr c (+ c3 1) l)))
- (setq zz ( atof(substr c (+ c3 1) l)))
- (if (= 1 ws) (setq zz4 (* zz 10)))
- (if (= 2 ws) (setq zz4 (* zz 100)))
- (setq zz5 (itoa(fix zz4)))
- (setq cd2 (strlen zz5))
- (setq zz1 (substr zz5 1 (- cd2 ws)))
- (setq zz2 (substr zz5 (+ (- cd2 ws) 1) ws))
- (setq zz6 (strcat zz1 "." zz2))
- (setq xyz (list y x z))
- (command "layer" "m" "dxd" "c" "7""""")
- (command "insert" "c:/maped/lib/p2" xyz bilichi ""0)
- (setq yy (+ y (* bilichi 0.0003)))
- (setq xyzc (list (+ yy (* bilichi 0.0015 )) x z))
- (command "text" "j" "ml" xyzc (* bilichi 0.002)"0" pn)
- (setq xyzz (list (+ yy (* bilichi 0.0015 )) (- x (* bilichi 0.003)) z))
- (command "layer" "m" "dm" "c" "3""""")
- )
- (setq c (read-line a))
- )
- (PRIN1)
- )
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|