[Home]XCircuit/FAQ

OpenCircuitWiki | XCircuit | RecentChanges | Preferences | Sandbox
Open Circuit Design | Magic | XCircuit | IRSIM | Netgen | PCB

Questions and Answers

1. How would I go on to create a library for entities that I use often, but are not a part of any of the libraries in the standard distribution?
2. How do I create busses which export properly to IRSIM?
3. How do I import text into XCircuit?
4. How do I export drawings into other documents?

1. How would I go on to create a library for entities that I use often, but are not a part of any of the libraries in the standard distribution?

The most thorough and most convenient library management is in XCircuit version 3.6. Setting up a project library is covered in the online Tutorial number 3. Basically, though, the solution is about the same for either version 3.4 or 3.6: Create the symbols you need as you normally would. They will end up in the "User Library". When you have the set of symbols you want, go to the User Library page and choose menu item "File->Save Library". Here you will choose the name of the library. If you name it "mylib", the file will be "mylib.lps".
Particularly with version 3.4, adding or deleting symbols from the library is most easily accomplished by editing the file, which is PostScript and therefore ASCII readable text. Each symbol is has a name beginning with a slash, followed by a definition block in braces: /mysymbol1 { ... } def. Version 3.6 allows you to move symbols between libraries by selecting the symbol (middle mouse button) while you're on the library page, then typing "M" (shift-m) for "move", and then typing "l" (next library) until you get to the library where you want the symbol, and clicking the left mouse button to place the symbol where you want (this also works for rearranging symbols within one library page).
The last problem is to get the library to show up every time you start XCircuit. On a multi-user system where you want the library to show up site-wide, you should load the library in the "xcstartup.tcl" file ("startup.script" in the non-Tcl version). On a single-user system, that is also an option, but it is better not to mess with the system startup file, or it will tend to get overwritten when you update the XCircuit distribution. Instead, load the library in your home directory ".xcircuitrc" file. If all you want to do is to add an additional library to the default list, that's all there is to it. If you want to mess with the default libraries, you need to specify "library override" at the top of your .xcircuitrc file (in version 3.4) or use the Tcl command "set XCOps(liboverride) true" in the Tcl-based version of XCircuit (this is also covered in Tutorial number 3). Unfortunately, the syntax has changed several times and differs between the Tcl and non-Tcl versions of XCircuit. Hopefully I can get around to tabulating all of the different versions and the appropriate statements in this Wiki, soon.

2. How do I create busses which export properly to IRSIM?

See BussesForIRSIM.

3. How do I import text into XCircuit?

You can use the X selection mechanism, which is handled by Tcl. Just bring up the console and type "source /usr/local/lib/xcircuit-3.6/selection.tcl". Now, you can select some text in one window, and paste it into XCircuit with the middle mouse button while you are editing a text label.

4. How do I export drawings into other documents?

To the extent that other documenting tools can import and display PostScript, the output file format of XCircuit can be directly imported. Users report varying degrees of success. Alternative methods involve using "convert" and "ps2pdf" to convert the output to various formats; try using "convert -density 300x300" to maintain high rendering resolution in a raster output format. From July 2009, XCircuit supports SVG output, which can be displayed in most web browsers, and is good for web publishing of circuit schematics.


OpenCircuitWiki | XCircuit | RecentChanges | Preferences | Sandbox
Open Circuit Design | Magic | XCircuit | IRSIM | Netgen | PCB
Page is read-only (use admin password ocd_edit to make writeable) | View other revisions
Last edited July 10, 2009 11:35 pm by Tim Edwards (diff)
Search: