Lisp Routine
Lisp Routine
(OP)
If I run a lisp which inserts text i.e. (command ".text" pt1 txth1 0 n2) in a certain drawing, Only 0 (zero) is inserted for all the points I require, yet my expected results should be say 56 57 or 58.
If I run the same routine on drawings which I created i get the right answer. Is there a system variable which needs to be set to ensure that zero results are elliminated. I will provide the lisp and drawing if you like it for examination.
If I run the same routine on drawings which I created i get the right answer. Is there a system variable which needs to be set to ensure that zero results are elliminated. I will provide the lisp and drawing if you like it for examination.





RE: Lisp Routine
RE: Lisp Routine
RE: Lisp Routine
RE: Lisp Routine
(setvar "textsize" txth1)
(command ".text" pt1 0 n2)
RE: Lisp Routine
Specify start point of text or [Justify/Style]:
Specify height <0.300>: .3
Specify rotation angle of text <0.00>:
Enter text: 56
Whereas this other drawing prompts as follows:
Specify start point of text or [Justify/Style]:
Specify rotation angle of text <0d30'0">: 0
Enter text: 56
Is there a way to ensure that the prompt sequence is the same given any drawing.
RE: Lisp Routine
RE: Lisp Routine
Thank you all for the support you gave me.
RE: Lisp Routine
Problem is easy to solve you, you must do the following thing:
Add the following thing to the routine:
(setq fntfuente (getvar "textstyle"))
(setq lst-fntfuente (tblsearch "STYLE" fntfuente))
(if (= 0.0 (cdr (assoc 40 lst-fntfuente)))
(progn
(setq txth1 3.5)
(command "_.text" pt1 txth1 0 n2)
)
(progn
(command "_.text" pt1 0 n2)
)
)
Un saludo de SpeedCAD... :)
CHILE