Author Topic: annotation text lisp  (Read 6643 times)

0 Members and 1 Guest are viewing this topic.

ChrisCarlson

  • Guest
Re: annotation text lisp
« Reply #15 on: November 16, 2015, 09:59:49 AM »
Are you sure about that?

Quote
Command: (command "_.-style" "_KEIM" "arial.ttf" "_annotative" "_yes" "_no" 2.5 1.0 0.0 "_no" "_no" "_no")
_.-style Enter name of text style or [?] <Title-Normal>: _KEIM
New style.
Specify font name or font filename (for SHX) <txt>: arial.ttf Specify height of text or [Annotative] <0'-0">: _annotative Create annotative text style [Yes/No] <Yes>: _yes Match text orientation to layout? [Yes/No] <No>: _no Specify height of text or [Annotative] <0'-0">: 2.500000000000000 Specify width factor <1.00000000>: 1.000000000000000
Specify obliquing angle <0>: 0.000000000000000 Display text backwards? [Yes/No] <No>: _no Display text upside-down? [Yes/No] <No>: _no
"_KEIM" is now the current text style.

Command: _no Unknown command "NO".  Press F1 for help.

Command: nil

Please follow this
http://www.lee-mac.com/debugvlide.html

pedroantonio

  • Guest
Re: annotation text lisp
« Reply #16 on: November 16, 2015, 10:04:38 AM »
Yes . This is an example from another lisp i use

Code - Auto/Visual Lisp: [Select]
  1. (command "_.-style" "_diast" "wgsimpl.shx" "_annotative" "_yes" "_no" 1.75 1.0 0.0 "_no" "_no" "_no")

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: annotation text lisp
« Reply #17 on: November 16, 2015, 10:12:32 AM »
@ Topographer:
Only if the font is an .shx font is the 'Draw text vertically?' option available. So the problem that Chris has mentioned does exist.
I think you should reread the other topic and change your code accordingly.

pedroantonio

  • Guest
Re: annotation text lisp
« Reply #18 on: November 16, 2015, 10:15:05 AM »
I have use a *.ttf again. I don't think tha the problem is there

ChrisCarlson

  • Guest
Re: annotation text lisp
« Reply #19 on: November 16, 2015, 10:16:40 AM »
It's not a fatal issue but an issue none the less. Until you step through the code in VLIDE or create checkpoints it will be hard to trouble shoot without going line by line and finding issues.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: annotation text lisp
« Reply #20 on: November 16, 2015, 10:18:44 AM »
Well, I am out.

pedroantonio

  • Guest
Re: annotation text lisp
« Reply #21 on: November 16, 2015, 10:29:23 AM »
Any other ideas?

ChrisCarlson

  • Guest
Re: annotation text lisp
« Reply #22 on: November 16, 2015, 10:35:05 AM »
Not until you step through the code and let me know which line is breaking the routine...

pedroantonio

  • Guest
Re: annotation text lisp
« Reply #23 on: November 16, 2015, 10:38:14 AM »
I run the code and gives me no errors.I type "test "  then Select Insertion Point and then nothing. In the layers the _KEIM layer is created the _KEIM text style is created but no text.

ChrisCarlson

  • Guest
Re: annotation text lisp
« Reply #24 on: November 16, 2015, 10:40:56 AM »
If this is the code you are running, the issue is you are not creating a text entity.

I try this but is not working

Code - Auto/Visual Lisp: [Select]
  1. (defun c:test (/ *error* varlist oldvars pt1 tval)
  2.     (COMMAND "_layer" "_m" "_KEIM" "_c" "7" "" "")
  3. (command "_.-style" "_KEIM" "arial.ttf" "_annotative" "_yes" "_no" 2.5 1.0 0.0 "_no" "_no" "_no")
  4.      (defun *error* (msg)
  5.     (mapcar 'setvar varlist oldvars)
  6.     (if (= msg "")
  7.         (princ "\nText Inserted.")
  8.         (princ "\nEsc or Error Pressed...")
  9.     ) ;_  end if
  10.     (princ)
  11.     ) ;_  end defun
  12.     (setq varlist (list "CMDECHO" "CLAYER")
  13.       oldvars (mapcar 'getvar varlist)
  14.     ) ;_  end setq
  15.     (while (and    (/= (setq pt1 (getpoint "\nSelect Insertion Point: ")) nil)
  16.         (/= (setq tval (getstring t "\nSpecify Text: ")) "")
  17.        ) ;_  end and
  18.     (if (not (tblsearch "Layer" "_KEIM"))
  19.         (command "-layer" "m" "_KEIM" "")
  20.     ) ;_  end if
  21.     ) ;_  end while
  22.     (*error* "")
  23.     (princ)
  24. ) ;_  end defun
  25.  

pedroantonio

  • Guest
Re: annotation text lisp
« Reply #25 on: November 16, 2015, 10:42:27 AM »
After test no error look

Code - Auto/Visual Lisp: [Select]
  1. visual lisp console
  2.  
  3. ; 1 form loaded from #<editor "<Untitled-0> loading...">
  4.  
  5. Build output
  6.  
  7. [CHECKING TEXT <Untitled-0> loading...]
  8. .
  9. ; Check done.
  10.  
  11.  
  12.  

pedroantonio

  • Guest
Re: annotation text lisp
« Reply #26 on: November 16, 2015, 10:44:03 AM »
Yes this is the code

ChrisCarlson

  • Guest
Re: annotation text lisp
« Reply #27 on: November 16, 2015, 10:49:27 AM »
You need to add lines to your function in order to create the text, all you are doing is getting variables, making layers/styles and prompting for insertion / text.

pedroantonio

  • Guest
Re: annotation text lisp
« Reply #28 on: November 16, 2015, 10:51:12 AM »
i am confused .Can you add this lines please?

Thanks