[PCB_FORUM] Re: custom texts from Concept to Allegro
- From: <george.h.patrick@xxxxxxxxxxxxxx>
- To: <icu-pcb-forum@xxxxxxxxxxxxx>
- Date: Thu, 18 May 2006 09:29:50 -0700
There is no way to automatically update text to a variable in Allegro that I
know of.
One way to do this is to write a SKILL script that gets the variable, finds the
text to be updated, deletes the old text and inserts the new. You would need
to run it to make the change. If the text is attached to a symbol the new text
can be reattached to the symbol.
Here's a chunk of code showing one way to do it...
(defun tekArtDate () "Display the date under the artwork title block"
(axlDBRefreshId nil)
; Scan through each symbol definition, setting the "
; tblk" variable when a "FILMBLK" symbol is found
(setq tblk `())
(foreach symbol (axlDBGetDesign)->symdefs
(when (equal (substring symbol->name 1 7) "FILMBLK")
(setq tblk (car symbol->instances)))
); end-foreach
(if (not tblk)
then
(axlUIConfirm "There is no Title Block available to add the date to!" )
else
(axlUIWPrint Form "Artwork Date and User ID Added to Title Block.")
(setq date (parseString (getCurrentTime)))
(setq date (strcat "ARTWORK GENERATED ON "
(cadr date)
(upperCase (car date))
(cadddr date)
" BY "
(upperCase (getLogin))))
(setq coord tblk->xy)
(setq rot tblk->rotation)
;adjust coordinates for rotation of title block
(setq x (car coord))
(setq y (cadr coord))
(cond ((equal rot 0) (setq y (difference y 780)))
((equal rot 90) (setq x (plus x 780)))
((equal rot 180) (setq y (plus y 780)))
((equal rot 270) (setq x (difference x 780)))
); end-cond
(setq coord (list x y))
;delete any existing text
(axlClearSelSet)
(axlSetFindFilter ?enabled "TEXT" ?onButtons "TEXT")
(axlAddSelectPoint coord)
(setq artText (car (axlGetSelSet)))
(axlDeleteObject artText)
;add the new text
(setq txtOr make_axlTextOrientation( ?textBlock "4"
?rotation rot
?mirrored nil
?justify "left"))
(axlDBCreateText date coord txtOr "MANUFACTURING/ALL_FILM" tblk))
); end-defun
--
George Patrick
Tektronix, Inc.
Central Engineering, Engineering Design Services
P.O. Box 500, M/S 39-512
Beaverton, OR 97077-0001
* 503-627-5272 (voice) * 503-627-5587 (fax) <http://www.tektronix.com/>
http://www.tektronix.com <http://www.pcb-designer.com/>
http://www.pcb-designer.com
"Off-Grid and Proud of it!"
-----Original Message-----
From: icu-pcb-forum-bounce@xxxxxxxxxxxxx
[mailto:icu-pcb-forum-bounce@xxxxxxxxxxxxx] On Behalf Of William Billereau
Sent: Thursday, May 18, 2006 05:46
To: icu-pcb-forum@xxxxxxxxxxxxx
Subject: [PCB_FORUM] custom texts from Concept to Allegro
Hello all again.
I found a nice unused thing on Concept:
Tools/Options, Custom Variables tab
I added some variables here and then I can automatically fill custom texts
defined in a page border symbol for example (like title, designer, board number
and so on.)
These variables are sent to Allegro by checking "Create User-defined
properties".
Now I am looking for a way to use these variables to update default texts in a
format symbol (page border like) and then auto fill them with values in Allegro.
Does anybody have an idea how to do it?
Thanks in advance.
William.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| Billereau William | PCB Designer |
| | Tel: (+4122) 76 73403 |
| CERN TS/DEM | william.billereau@xxxxxxx |
| 1211 Geneve 23 Switzerland | Société: AMEC-SPIE/Electrotech |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Other related posts: