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:
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.
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)
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.