#1
|
|||
|
|||
AM_TEXT_SETTINGS error
I'm trying to learn a little about lisp, and pulled the following from an example in the CoCreate documentation. However, it generates a "AM_TEXT_SETTINGS is undefined" message. Any ideas?
(in-package :csci) (use-package li) (sd-am-create-symbol-dialog :name "SYMBOL_DATUM" :title "Datum" osition-prompt "Place the datum symbol in drawing" :draw-symbol-command (let ((pnt1 (make-gpnt2d :x 0.0 :y 0.0)) ) ; change the symbol text and geo settings ; (else the current ones are taken) (sd-call-cmds (AM_TEXT_SETTINGS :size 3.5 :abs_angle 0.0 :slant 0.0 :ratio 1.0 :adjust 5 :frame "OFF" :font1b "hp_i3098_v")) ; define the symbol parameters (sd-am-create-symbol-parameter "datum" DATUM osition pnt1) (sd-am-create-symbol-line (list (make-gpnt2d :x -3 :y -3) (make-gpnt2d :x +3 :y -3) (make-gpnt2d :x +3 :y +3) (make-gpnt2d :x -3 :y +3) (make-gpnt2d :x -3 :y -3))) ) ;; end let :before-position (setf last-text-length (* 3.5 (+ 4 (length datum)))) :after-position (progn (setf max-datum (+ max-datum 1)) (when (< max-datum 26) (setf DATUM (format nil "~A" (code-char (+ 65 max-datum)))) ) ) ;; end after-input :local-functions ( (make-beautiful (a-string) (sd-string-upcase a-string) ) ) :save-variables (datum) :variables ( (DATUM :value-type :string :title "Datum" rompt-text "Specify the Datum" :initial-value "A" :after-input (setf DATUM (make-beautiful DATUM)) ) ;; end datum (max-datum :initial-value 0 ) ;; end max-datum ) ;; end variables ) ;; end macro call |
#2
|
|||
|
|||
Re: AM_TEXT_SETTINGS error
What version you using?
If it's 17.x then that command shouldn't be used because your text settings are set in your default_settings. |
#3
|
||||
|
||||
Re: AM_TEXT_SETTINGS error
The function AM_TEXT_SETTINGS is obsolete as of Modeling Version 17.0
|
#4
|
|||
|
|||
Re: AM_TEXT_SETTINGS error
Yes, I'm using version 17.0. What is the correct way to set the text properties in LISP?
|
#5
|
|||
|
|||
Re: AM_TEXT_SETTINGS error
Change the text settings in the Default Settings UI and when you exit, a lisp file will be created in the user directory.
No need to create your own any longer. |
#6
|
|||
|
|||
Re: AM_TEXT_SETTINGS error
The text settings that I would like to use are specific to the symbol that I am creating. I will not be using them for general text creation. Is there any way to do this now with LISP?
|
#7
|
|||
|
|||
Re: AM_TEXT_SETTINGS error
In the settings, create a new text style that you'll use only in your symbol.
Forget about the lisp. You're making it more difficult that it needs to be. |
#8
|
|||
|
|||
Re: AM_TEXT_SETTINGS error
I'm using some code that will automatically increment a dimension number (similar to this post: www.cocreateusers.org/forum/showthread.php?t=7359), hence the use of lisp. How can I dynamically apply text settings to the symbol?
Last edited by gday; 01-07-2011 at 07:21 AM. |
#9
|
||||
|
||||
Re: AM_TEXT_SETTINGS error
use the IKIT function : sd-set-symbol-settings ... (well documented) to specify the appearence of the symbol within the :draw-symbol-command slot.
Quote:
Meanwhile symbols can be defined in sync for 3D docu and Annotation! Have a look to the example at the end of sd-doc3d-create-symbol-dialog documentation. There's a symbol definition which is used for Annotation and 3D Documentation in a 'single' step.
__________________
|
#10
|
|||
|
|||
Re: AM_TEXT_SETTINGS error
Perfect! That was exactly what I was looking for. Thank you, Wolfgang.
|
Tags |
annotation, error, lisp |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|