Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lisp Routine

Status
Not open for further replies.

tendai1

Structural
Mar 29, 2003
24
0
0
GB
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.
 
Replies continue below

Recommended for you

I have analysed the (command ".text")'s prompt sequence for the different drawings. On all of my drawings the sequence is as follows:

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&quot;>: 0
Enter text: 56

Is there a way to ensure that the prompt sequence is the same given any drawing.
 
Hi...

Problem is easy to solve you, you must do the following thing:

Add the following thing to the routine:

(setq fntfuente (getvar &quot;textstyle&quot;))
(setq lst-fntfuente (tblsearch &quot;STYLE&quot; fntfuente))
(if (= 0.0 (cdr (assoc 40 lst-fntfuente)))
(progn
(setq txth1 3.5)
(command &quot;_.text&quot; pt1 txth1 0 n2)
)
(progn
(command &quot;_.text&quot; pt1 0 n2)
)
)

Un saludo de SpeedCAD... :)
CHILE
 
Status
Not open for further replies.
Back
Top