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

operating problems

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I wrote this code:
Code:
 (defun pn2 (/corr1 hpn .................................................................................................................................................... )
...... .
...... .
(if = times "1")
(progn)
(princ "\n")
(princ "volts > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 
(princ times)
(princ "\n")
(sevenq times "2")
(setq fp1 (open "c:\\\autocadsupport\\\varie\datipuntonascosto.dat" "w"))
(write-line hvtxt fp1)
(write-line times fp1)
(write-line height difference pointnascostotxt fp1)
(close fp)
(runapp "c:\\autocadsupporto\\\libertytre\\dronevolte1.exe "c:\\\\autocadsupporto\\libertytre\\\\dronevolte1.tkn" :vlax-true)

(seq answer (getcliptext)
(princ "\n")
(princ)
(princ reply)
(princ "\n")
(if)
(pn)
);
);
(progn)
(princ "\n")
(princ "volts > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 
(princ times)
(princ "\n")
(runapp "c:\\autocadsupporto\\\libertytre\\dronevolte2.exe "c:\\\\autocadsupporto\\libertytre\\\\dronevolte2.tkn" :vlax-true)
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\datidrone.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\datidrone.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\datidrone.dat")
);
;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\\\quotepuntonascosto.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\\\'quotepuntonascosto.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\quotepuntonascosto.dat")
);
;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\\datipuntonascosto.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\\datipuntonascosto.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\datipuntonascosto.dat")
);
);
);
the procedure > dronevolte1.exe < returns, after the execution, actually "yes" as > answer < but > pn2 < not part for the second time.
I have also tried with other procedures rather than > pn2 < but no part.
Why?
Thank you very much.
 
the relative code sometimes=2 I would marry it within the condition, without recalling pn2 in a recursive manner:
Code:
(defun pn2 (/corr1 corr2 hpn .................................................................................. )
(if = times "1")
(progn)
(princ "\n")
(princ "volts > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 
(princ times)
(princ "\n")
(sevenq times "2")
(setq fp1 (open "c:\\\autocadsupport\\\varie\datipuntonascosto.dat" "w"))
(write-line hvtxt fp1)
(write-line times fp1)
(write-line height difference pointnascostotxt fp1)
(close fp)
(runapp "c:\\autocadsupporto\\\libertytre\\dronevolte1.exe "c:\\\\autocadsupporto\\libertytre\\\\dronevolte1.tkn" :vlax-true)

(seq answer (getcliptext)
(princ "\n")
(princ)
(princ reply)
(princ "\n")
(if)
(progn)
(princ "\n")
(princ "volts > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 
(princ times)
(princ "\n")
(runapp "c:\\autocadsupporto\\\libertytre\\dronevolte2.exe "c:\\\\autocadsupporto\\libertytre\\\\dronevolte2.tkn" :vlax-true)
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\datidrone.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\datidrone.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\datidrone.dat")
);
;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\\\quotepuntonascosto.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\\\'quotepuntonascosto.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\quotepuntonascosto.dat")
);
;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\\datipuntonascosto.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\\datipuntonascosto.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\datipuntonascosto.dat")
);
);
);
);
);
)
 
I applied your version but it doesn't work.
My intention is to restart > pn2 < in case of > answer < = "yes".
Thank you.
 
I tried to change the program by writing a routine called > pn3 < (not present here) equal to > pn2 <, trying to launch it to the answer "yes" but nothing happens, no error message is given!
Code:
 (if = times "1")
(progn)
(princ "\n")
(princ "volts > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 
(princ times)
(princ "\n")
(sevenq times "2")
(setq fp1 (open "c:\\\autocadsupport\\\varie\datipuntonascosto.dat" "w"))
(write-line hvtxt fp1)
(write-line times fp1)
(write-line height difference pointnascostotxt fp1)
(close fp)
(runapp "c:\\autocadsupporto\\\libertytre\\dronevolte1.exe "c:\\\\autocadsupporto\\libertytre\\\\dronevolte1.tkn" :vlax-true)

(seq answer (getcliptext)
(princ "\n")
(princ)
(princ reply)
(princ "\n")
(if)
(pn)
);
);
(progn)
(princ "\n")
(princ "volts > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 
(princ times)
(princ "\n")
(runapp "c:\\autocadsupporto\\\libertytre\\dronevolte2.exe "c:\\\\autocadsupporto\\libertytre\\\\dronevolte2.tkn" :vlax-true)
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\datidrone.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\datidrone.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\datidrone.dat")
);
;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\\\quotepuntonascosto.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\\\'quotepuntonascosto.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\quotepuntonascosto.dat")
);
;; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(seq control1 nil)
(setq control1 (findfile "c:\\\autocadsupport\\\\\\\datipuntonascosto.dat"))
(if (= control1 "c:\\\autocadsupport\\\\\\\datipuntonascosto.dat")
(vl-file-delete "c:\\autocadsupport\\\varie\datipuntonascosto.dat")
);
);
);
 
does not work mean that if answer is "yes" does not start the dronevolte2.exe file?
Are you sure the answer is "yes", have you tried to verify the length of the string?
 
After many changes, finally the program reacts to the answer "yes" now tells me that there is no function > pn3> but it is already another thing!
I know.
 
Okay now the problem is another!
load the function > pn3 < there are no errors.
start the function > pn2 < when starting > pn3 < receive :
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
reply > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
; error: no function definition: pn3
It is unarming!
Thank you.
 
I solved the problem in a simple but functional way.
I have created the function > pn3 < within a single programme so that > pn2 < e > pn3 < pn3 < pn3 < e pn2 < see > pn3 <
everything works perfectly.
Thank you all.
 

Forum statistics

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

Members online

No members online now.
Back
Top