CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > Annotation

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 12-10-2010, 09:38 AM
gday gday is offline
Registered User
 
Join Date: Apr 2009
Posts: 24
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
Reply With Quote
  #2  
Old 12-10-2010, 10:45 AM
Gary Brauch Gary Brauch is offline
Registered User
 
Join Date: Oct 2002
Location: Colorado
Posts: 220
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.
Reply With Quote
  #3  
Old 12-10-2010, 10:47 AM
Mike Swartz's Avatar
Mike Swartz Mike Swartz is offline
Registered User
 
Join Date: Jan 2004
Location: Fort Collins
Posts: 322
Re: AM_TEXT_SETTINGS error

The function AM_TEXT_SETTINGS is obsolete as of Modeling Version 17.0
Reply With Quote
  #4  
Old 12-13-2010, 06:27 AM
gday gday is offline
Registered User
 
Join Date: Apr 2009
Posts: 24
Re: AM_TEXT_SETTINGS error

Yes, I'm using version 17.0. What is the correct way to set the text properties in LISP?
Reply With Quote
  #5  
Old 12-15-2010, 07:56 AM
Gary Brauch Gary Brauch is offline
Registered User
 
Join Date: Oct 2002
Location: Colorado
Posts: 220
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.
Reply With Quote
  #6  
Old 12-20-2010, 01:19 PM
gday gday is offline
Registered User
 
Join Date: Apr 2009
Posts: 24
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?
Reply With Quote
  #7  
Old 12-21-2010, 05:04 AM
Gary Brauch Gary Brauch is offline
Registered User
 
Join Date: Oct 2002
Location: Colorado
Posts: 220
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.
Reply With Quote
  #8  
Old 01-07-2011, 07:16 AM
gday gday is offline
Registered User
 
Join Date: Apr 2009
Posts: 24
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.
Reply With Quote
  #9  
Old 01-10-2011, 10:12 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
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:
Functions to be used within the symbol definition code (3D Documentation & Annotation)
--------------
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.
Reply With Quote
  #10  
Old 01-10-2011, 03:41 PM
gday gday is offline
Registered User
 
Join Date: Apr 2009
Posts: 24
Re: AM_TEXT_SETTINGS error

Perfect! That was exactly what I was looking for. Thank you, Wolfgang.
Reply With Quote
Reply

Tags
annotation, error, lisp


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:31 PM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.