Re: Re: Sheet order
CHV501-ADC.sch => "CHV501-ADC-Adc0001.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc0203.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc0405.sch"
### CHV501-ADC-Adc0203.sch Sheet 4 24
### CHV501-ADC-Adc0405.sch Sheet 5 24
To: kicad-users-hHKSG33TihhbjbujkaE4pw@public.gmane.org
Sent: Sunday, January 29, 2012 1:45 PM
Subject: [kicad-users] Re: Sheet order
first, let's see how Kicad works.
The latest item (component, text, sheet, line...) added to the
schematic appears first in the corresponding file.
If you have a main sheet (page 1), and add an hierachical sheet,
this latest is numbered '2'.
If now you add a thirth sheet, it will appear in the file before
your formerly existing second sheet. So, the main sheet is always
page 1/3, the latest added becomes page 2/3 and the formerly existing
second sheet will be the lastest page ('3/3').
Kicad will number the sheets in following way :
- main sheet is page 1,
- each sheet referred to in this main sheet is numbered in the way
the file is parsed (from begin to end of file), ie the sub-sheets
are numberred from latest added to oldest.
- for each subsheet, replay this process.
For example, a 24 sheet schematic :
### CHV501_03.sch Sheet 1 24
CHV501_03.sch => "CHV501-ADC.sch"
CHV501_03.sch => "CHV501-XILINX.sch"
CHV501_03.sch => "CHV501-MEMOIRE.sch"
CHV501_03.sch => "CHV501-VIDEO.sch"
CHV501_03.sch => "CHV501-IO.sch"
CHV501_03.sch => "CHV501-IRIG_RS232.sch"
CHV501_03.sch => "CHV501-ALIM.sch"
CHV501_03.sch => "CHV501-PCCARD.sch"
CHV501_03.sch => "CHV501-ETHERNET.sch"
### CHV501-ADC.sch Sheet 2 24
CHV501-ADC.sch => "CHV501-ADC-Adc0001.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc0203.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc0405.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc0607.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc0809.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc1011.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc1213.sch"
CHV501-ADC.sch => "CHV501-ADC-Adc1415.sch"
CHV501-ADC.sch => "CHV501-ADC-Ref.sch"
### CHV501-XILINX.sch Sheet 3 24
CHV501-XILINX.sch => "CHV501-XILINX_012.sch"
CHV501-XILINX.sch => "CHV501-XILINX_345.sch"
CHV501-XILINX.sch => "CHV501-XILINX_67.sch"
### CHV501-MEMOIRE.sch Sheet 4 24
CHV501-MEMOIRE.sch => "CHV501-MEMOIRE-Memoire0.sch"
CHV501-MEMOIRE.sch => "CHV501-MEMOIRE-Memoire1.sch"
### CHV501-VIDEO.sch Sheet 5 24
### CHV501-IO.sch Sheet 6 24
### CHV501-IRIG_RS232.sch Sheet 7 24
### CHV501-ALIM.sch Sheet 8 24
### CHV501-PCCARD.sch Sheet 9 24
### CHV501-ETHERNET.sch Sheet 10 24
### CHV501-ADC-Adc0001.sch Sheet 11 24
### CHV501-ADC-Adc0203.sch Sheet 12 24
### CHV501-ADC-Adc0405.sch Sheet 13 24
### CHV501-ADC-Adc0607.sch Sheet 14 24
### CHV501-ADC-Adc0809.sch Sheet 15 24
### CHV501-ADC-Adc1011.sch Sheet 16 24
### CHV501-ADC-Adc1213.sch Sheet 17 24
### CHV501-ADC-Adc1415.sch Sheet 18 24
### CHV501-ADC-Ref.sch Sheet 19 24
### CHV501-XILINX_012.sch Sheet 20 24
### CHV501-XILINX_345.sch Sheet 21 24
### CHV501-XILINX_67.sch Sheet 22 24
### CHV501-MEMOIRE-Memoire0.sch Sheet 23 24
### CHV501-MEMOIRE-Memoire1.sch Sheet 24 24
I would like to have CHV501-ADC-Adc0001.sch .. CHV501-ADC-Adc1415.sch
and CHV501-ADC-Ref.sch directly after CHV501-ADC.sch,
CHV501-XILINX_012.sch, CHV501-XILINX_345.sch and CHV501-XILINX_67.sch after CHV501-XILINX.sch
and so on, but it isn't the case.
The only thing you can control is the numbering of sub-sheets in
a sheet. I do it manualy by directly editing the sch file (easy and
fast...).
I use to put all sub-sheets at end of the sch file, and sort them as
I want:
../..
$Sheet
S 11250 2800 1600 3100
F0 "PCCARD" 60
F1 "CHV501-PCCARD.sch" 60
F2 "PCCARD_D[0..15]" B L 11250 3000 60
F3 "PCCARD_A[0..2]" I L 11250 3200 60
F4 "PCCARD_IORD" I L 11250 3400 60
F5 "PCCARD_IOWR" I L 11250 3500 60
F6 "PCCARD_IOCS16" I L 11250 5500 60
F7 "PCCARD_IORDY" I L 11250 3600 60
F8 "PCCARD_INTRQ" I L 11250 3800 60
F9 "PCCARD_RESET" I L 11250 3900 60
F10 "PCCARD_CS0" I L 11250 4400 60
F11 "PCCARD_CS1" I L 11250 4500 60
F12 "PCCARD_VS1" I L 11250 5000 60
F13 "PCCARD_VS2" I L 11250 5100 60
F14 "PCCARD_CD" I L 11250 5300 60
F15 "PCCARD_DASP" I L 11250 4700 60
F16 "PCCARD_PDIAG" I L 11250 4800 60
F17 "PCCARD_DMARQ" I L 11250 4100 60
F18 "PCCARD_DMACK" I L 11250 4200 60
F19 "PCCARD_DIR" I L 11250 5700 60
$EndSheet
$Sheet
S 11250 7800 1600 2000
F0 "ETHERNET" 60
F1 "CHV501-ETHERNET.sch" 60
F2 "ETH_RESET_N" I L 11250 9600 60
F3 "ETH_PWR_DOWN" I L 11250 9400 60
F4 "ETH_CRS" O L 11250 8900 60
F5 "ETH_RX_DV" O L 11250 8800 60
F6 "ETH_RX_ER" O L 11250 9000 60
F7 "ETH_COL" O L 11250 9100 60
F8 "ETH_RXD[0..3]" O L 11250 9200 60
F9 "ETH_RX_CLK" O L 11250 8700 60
F10 "ETH_TXD[0..3]" I L 11250 8200 60
F11 "ETH_TX_EN" I L 11250 8100 60
F12 "ETH_MDC" I L 11250 8400 60
F13 "ETH_MDIO" B L 11250 8500 60
F14 "ETH_TX_CLK" O L 11250 8000 60
$EndSheet
$EndSCHEMATC
In this case, the sub-sheet "CHV501-PCCARD.sch" will appear before
"CHV501-ETHERNET.sch". If I want the Ethernet to appear before
PCCard, I have to permutate their order in the file.
Here a little csh script to extract sheet information from sch files, for native linux or for example for cygwin under Windows :
$ cat do_sheet
#! /bin/csh
#
set SCH=$1
#
###
#
echo -n "###" $SCH " "
cat $SCH | grep -i "^SHEET"
#
cat $SCH | awk 'BEGIN {flag=0} { \
if ($1 == "$Sheet") { \
flag = 1; \
} \
if ((flag == 1) && ($1 == "F1")) { \
flag = 0; \
printf ("%s => %s\n", "'$SCH'", $2) \
} \
}'
$ foreach F ( *.sch )
foreach? ./do_sheet $F
foreach? end
$
regards,
Charles.
PS: before patching sch files, always save a copy.
--- In kicad-users-hHKSG33TihhbjbujkaE4pw@public.gmane.org, Sepehr Kiani <skiani <at> ...> wrote:
>
> Hi all,
>
> As usual I have bitten off more than I can chew so my first
> schematic in KiCAD is >20 sheets. The order of the sheets is all
> wacky due to the way the design has evolved. Is there anyway to
> order the sheets?
>
> thanks,
> ---
> Sepehr (Sep) Kiani
> Email: skiani <at> ...
>
__._,_.___
Please read the Kicad FAQ in the group files section before posting your question.
Please post your bug reports here. They will be picked up by the creator of Kicad.
Please visit http://www.kicadlib.org for details of how to contribute your symbols/modules to the kicad library.
For building Kicad from source and other development questions visit the kicad-devel group at http://groups.yahoo.com/group/kicad-devel
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
Best regards
Maciek
--- In
RSS Feed