Hello Phil,

I've been using XCircuit for a long time.   I primarily use it for high
level overview drawings of my ATE setups for IC testing.    It's really
great for quick drawings.    I make a little library of my instruments
(AWG,DGT, sources, etc,) and then I can quickly describe the test
procedures to anyone who needs to know.    It's quick, easy,  free.

I usually keep the documents for my own information and reference.    I
was recently asked to make diagrams that could be kept under document
control with #'s and date created, modified, author etc.      So I have
to go through a large number of schematics and update text everywhere.

I tried to do a little tcl from the command line "label make info {Text
{ Todays Date} }"       -   It doesn't work and crashes XCircuit.  I'm
using Windows and prepackaged version 3.8.

Any help appreciated.   I just need to be able to page, write some text,
go to next page, write text, etc.

I've done this before, and it's not too difficult.  I find that the
best way to go about it is to have a parameter, call it, say, "moddate",
that represents not today's date, but the date of last modification of
the document, so the parameter expression looks like

        clock format [file mtime [page filename]]

You can make this parameter from the parameter window GUI, or if you
prefer the command-line interface, you can do:

        parameter make expression moddate {clock format [file mtime
                [page filename]]} -verbatim

If you do that before you save a copy of the file, then you'll get
error messages in the expression, because "page filename" returns an
empty string.  However, assuming that you have saved at least a
preliminary copy of the file, then you can do:

        paramter get moddate

and get a result like

        {Mon Mar 21 13:23:08 EDT 2016}

With that parameter now made and available, you can create the label
you want by using the GUI and typing it in, using "Ctrl-P" to bring up
a window with the list of parameters and then clicking on the key name
("moddate") to insert the value ("Mon Mar 21...").

To do this from the command line, the command would be something like:

        label make info {{Text {Today's Date is }} {Parameter moddate}}
                {0 0}

The interesting thing about this method is that any time you go to write
back the file to disk, the expression is calculated on the fly while the
file is being written, and the file has been opened, and therefore
modified, at that time.  So the date string that ends up in the text
of the saved file is the exact time that the file was written.  It will
not, as I have seen numerous (ahem) Microsoft format documents do, try
to update the text to today's date every time you open the file for
reading or editing.

Also note that this parameter can be made on an object, such as an
object representing the whole title block and/or sheet border, since the
command "page filename" will just work up the hierarchy until it finds
an actual page, and figure out the filename from there.  This sort of
title block can also contain a page number reference with a parameter
executing the command "page" to return the page number, so that page
numbers are all created automatically.

Version 3.8 ought to do everything you need, although I can't specifically
vouch for the Windows version since I don't use it.  I would have expected
that your label command (as written) would just generate a syntax error
(that's what it does for me), not crash XCircuit.  But there are numerous
little parsing errors in the Tcl interface that I fix from time to time
as I discover them, so it could be a minor fix between 3.8 and 3.9.

                                                ---Tim

+--------------------------------+-------------------------------------+
| R. Timothy Edwards (Tim)       | email: t...@opencircuitdesign.com    |
| Open Circuit Design            | web:   http://opencircuitdesign.com |
| 19412 Cissel Manor Drive       | phone: (301) 528-5030               |
| Poolesville, MD 20837          | cell:  (408) 828-8212               |
+--------------------------------+-------------------------------------+
_______________________________________________
Xcircuit-dev mailing list
Xcircuit-dev@opencircuitdesign.com
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to