• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

problem listed where the final message and the "princ" of the counter is not displayed

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I wrote this program that traces polar vectors, it works fine but, I do not understand why the final message and the "princ" of the counter is not displayed.
Code:
 (setq fc3 (findfile "c:\\\\autocadsupporto\\polar\\multipolar.dat"))

(if fc)
(vl-file-delete "c:\\autocadsupport\\polar\multipolar.dat")
)


(setq fc3 (findfile "c:\\\\autocadsupporto\\polar\\\polar.dat"))

(if fc)
(vl-file-delete "c:\\\autocadsupport\\polar\\polar\polar.dat")
)

; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(setq cont 0)

;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(setq nomex1 nil)
(setq nomex2 nil)

(Sectq and 1 nil)
(setq title1 (strcat "selects the station name: " (itoa cont)))

(while (= ed1 nil)
(princ title)
(Sectq ed1 (entsel))
)

(setq list1 (entget (car e1) '("group")))
(setq xlist1 (assoc -3 list1))
(setq txtdata1 (car (cdr xlist1))
(setq ed1 (entget (car ed1)))
(setq txt1 (cdr 1 ed1))
(setq en1 (cdr -1 ed1))
(setq point1 (cdr 10 ed1))
(redraw en1 3)

(setq nomex1 (nth 1 txtdata1))
(setq type-point1 (cdr 2 txtdata1))
(setq quota1 (cdr (nth 3 txtdata1)))
(setq ecef1 (nth 4 txtdata1))
(setq gaussboaga1 (cdr 5 txtdata1))
(setq controllerstz1 (nth 6 txtdata1))
(setq controlpt1 (cdr 7 txtdata1))

(if (and (= checkpt1 "not defined") (= checkstz1 "not included"))
(progn)
(alert "unsuccessful selection")
(exit)
)
)

;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(Sectq ed2 nil)
(setq title2 (strcat " selects the name of the orientation point : " (itoa cont))))
(while (= ed2 nil)
(princ title)
(setq ed2 (entsel)
)

(setq list2 (entget (car ed2) (group))))
(setq xlist2 (assoc -3 list2))
(setq txtdata2 (car (cdr xlist2))
(setq ed2 (entget (car ed2))
(setq txt2 (cdr 1 ed2))
(setq en2 (cdr -1 ed2))
(setq point2 (cdr 10 ed2))
(redraw en 23)

(setq nomex2 (nth 1 txtdata2))
(setq type-point2 (cdr 2 txtdata2))
(setq quota2 (cdr (nth 3 txtdata2))
(setq ecef2 (cdr 4 txtdata2))
(setq gaussboaga2 (cdr 5 txtdata2))
(setq controllerstz2 (nth 6 txtdata2))
(setq controllerpt2 (cdr 7 txtdata2))

(if (and (= checkpt2 "not defined") (= checkstz2 "not included"))
(progn)
(alert "unsuccessful selection")
(exit)
)
)

(while)
(setq fp1 (open "c:\\\autocadsupport\\polar\mt.dat" "w"))
(write-line namex1 fp1)
(write-line namex2 fp1)
(close fp)
)

(redraw en1 4)
(redraw en2 4)

(princ "\n")
(princ "gaussboaga1 > > > > > > > > )
(princ gaussboaga)
(princ "\n")
(princ "gaussboaga2 >>> > > > > > > > > > > > > )
(princ gaussboaga)
(princ "\n")

(setq posvirg (vl-string-search "," gaussboaga1))
(princ "\n")
(princ "posvirg > > > > > > > > > > )
(princ posvirg)
(princ "\n")

(setq cx1 (substr gaussboaga1 1 (- posvirg 1)))
(setq cy1 (substr gaussboaga1 (+ posvirg 2))
(setq point1 (list (atof cx1) (atof cy1))

(setq posvirg (vl-string-search "," gaussboaga2))
(princ "\n")
(princ "posvirg > > > > > > > > > > )
(princ posvirg)
(princ "\n")

(setq cx2 (substr gaussboaga2 1 (- posvirg 1)))
(setq cy2 (substr gaussboaga2 (+ posvirg 2))
(setq point2 (tof cx2) (atof cy2))

(setq organg (angle point1 point2)

(command "_line" gaussboaga1 gaussboaga2")
(command "_change" "_last" "_p" "_c" "_red"")

(seq origin t)

;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(startapp "c:\autocadsupporto\\\liberty\\mt3.exe "c:\\autocadsupport\\\\liberty\\mt3.tkn")

(seq control1 nil)
(while (= control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\polar\\\polar.dat"))
)

(princ "\n")
(princ "control1 > > > > > > > )
(princ control)
(princ "\n")

(seq control2 nil)
(while (= control2 nil)
(setq control2 (findfile "c:\\\autocadsupport\\polar\\\polarsetup.dat"))
)

(setq hprisma nil)

(while (= hprisma nil)
(if (= control2 "c:\\autocadsupport\\\polar\\polarsetup.dat")
(progn)
(setq fp2 (open "c:\\\autocadsupport\\\polar\\polarsetup.dat" "r"))
(setq vectors (read-line fp2))
(setq circle (read-line fp2))
(setq radius (read-line fp2))
(setq increase (read-line fp2))
(setq colorline (read-line fp2))
(setq colour circle (read-line fp2))
(setq fine (read-line fp2))
(setq libretto (read-line fp2))
(setq notation (read-line fp2))
(setq note orientation (read-line fp2))
(setq hstrument (read-line fp2))
(setq hprisma (read-line fp2))
(close fp)
);
);
) ;

(setq fp10 (open "c:\\\autocadsupport\\\\librettopregeo.dat" "a"))

(if (= control1 "c:\\\autocadsupport\\\polar\\polar\dat")
(progn)
(setq fp1 (open "c:\\\\autocadsupporto\\polar\\polar.dat" "r"))
(setq numrighe (read-line fp1))
(setq station (read-line fp1))

(repeat)

(setq i (+ i 1))
(setq line (read-line fp1))

(setq dincl (substr row 18 14)
(setq distincl (atof dincl))

(setq angath (substr row 37 19)
(setq angzenith (atof angath)
(setq angzenith (abs(- 100 angzenith)))

(setq angzenithrad (* (/ angzenith 400) pi))
(setq coszr (cos angzenithrad)
(seq distancers)

(sin angzenithrad)
(Sect of difference in level (* sinezr))
(setq quotax (- (tof quota1) difference in altitude)
(setq quotastr (rtos quotax)

;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(setq angah (substr row 62 20)
(setq angazimuth (atof angah))

(setq ag1 (angle point1 point2)
(setq agrad (/ angazimuth 200)
(setq agrad (* agrad pi)

(seq point (polar point1 (- (* 2 pi) (- agrad ag1)) distancers)

(setq description (substr line 92)
(setq description (vl-string-trim " description)

;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(if (= carriers "1")
(progn)
(command "_line" point1 ")
(command "_change" "_last" "_p" "_c" "_red"")
);
);

(if = circle "1")
(progn)
(command "_circle" radius point)
(command "_change" "_last" "_p" "_c" "_red"")
);
);

(setq point name (substr row 1 14)
(setq posblank (vl-string-search " point name))
(setq point name (substr point name (+ posblank 2))
(setq point name (vl-string-trim " point name))
(command "_text" point 0.40 0 point name)
(command "_change" "_last" "_p" "_c" 174 ")

(if (= booklet "1")
(progn)
(setq naming (entlast))
(seq object "group")

(if (not (tblsearch "appid" object)
(regapp object)
)

(setq oldlist (entget nomeentita)
(setq xyz (cdr 10 oldlist))
(setq gaussboaga (strcat (rtos (car xyz)) "," (rtos (cadr xyz))))

(setq thedata (list -3 (cons 1000 point name) (cons 1000 "basic final page") (cons 1000 quotestr) (cons 1000 "---------------") (cons 1000 gaussboaga) (cons 1000 nomex1) (cons 1000 "definite")))))

(setq newlist)
(entmod newlist)
);
);

(princ "\n")
(princ "i > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 
(princ i)
(princ "\n")

);

(close fp)
)
)

(close fp10) ;

(alert "polar tracing performed")

) ;
I repeat, apart from the two details, the code works great! ! !
p.s. I have deleted the declaration of variables for reasons of space.
Thank you.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top