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

problems with using an external program

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I am using with good results the combination of autolisp with an external program (liberty basic) but, in this case, I cannot obtain the desired result:
Code:
(setq colorline ")
(setq typeline ")

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

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

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

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

(princ "\n")
(princ control)
(princ "\n")

(if (= control1 "c:\\autocadsupport\\\\contorno.dat")
(progn)
(setq fp4 (open "c:\\\autocadsupport\\\\contorno.dat" "r"))
(setq colorline (read-line fp4))
(setq typeline (read-line fp4))
(close fp)
)
)

(princ)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(princ colorelinea)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(princ tipolinea)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(princ)
the program "contorno.exe" receives the input of data related to "coloreline" and "typeline" and saves them in "c:\\\\autocadsupporto\\\\\contorno.dat".
once found this file, autolisp should open it and extract variables.
place that the file "c:\\\autocadsupport\\\\\contorno.dat" is produced, the variables are not extracted believe, for a synchronism problem.
What can I do to prevent autolisp coming first and not find the ready data to extract?
or is there such a macroscopic error that, in fury to look at it, I cannot find?
Thank you.
 

Forum statistics

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

Members online

No members online now.
Back
Top