kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #00704
Re: Redundunt Lib path info
Frank Bennett a écrit :
Here is an area for enhancement I could work on with
some background info before I jump into the code.
At first glance it seems the library Path information
is required to be in the schematic file(.sch) and in the
project file(.pro). I wonder why this is the case.
The lib infos in the schematic files are not used (consider these infos
as comments)
the line can be only
LIBS:
Only the .pro is used. The .pro is not required.
kicad can use the default configuration file kicad.pro in
kicad/template for all projects without .pro file.
If I'm importing a schematic with it's libraries as
is the case with an OrCad EDIF file, I can include
the Library Refs in the schematics file with a path='.',
the schematic and library files in some temp directory
unknown to KiCad and I would expect EEschema to be able to
run standalone without the KiCad project mgr. This doesn't seem
to be the case so I create a new project using KiCad and
it sets up the default libraries/ install PATH.
Why should KiCad need to know either the EEschema or pcbnew
libraries/Path? Putting the info in two places doesn't
seem optimal or necessary.
In most cases: nothing.
If it is the "standard" path (kicad/library and library/modules) it is
not required
The path is required **only** in non standard installations.
If no .pro found in current path, kicad uses the default kicad.pro in
kicad/template.
Also is the Library PATH a single PATH or can it be
a ':' separated multipath also dictating the search path
for symbols or footprints? Could be one search path for
both since symbols are (.sym) and footprints are (.mod).
Only one path can be entered.
it is assumed the .sym and the .lib are in the same directory.
the .sym are only shapes which can be loaded when creating a component
(and can be elsewhere).
Thes files are not needed to run eeschema.
A search path would also help with multiple symbols for
resistors and caps coming out of OrCad (or other sources)
also with different scaling/orientation. The user would only
need to make sure symbols for the current schematic was first
in the list.
The order of libraries (in the library list in eeschema configuration)
is also the order of the component search and load.
Not all the libraries must be in the default path. If a library is not
in the default path, no problems, its name must be the full file name.
the libraries which have a name starting by ./ (like ./mylib.lib) are
searched in the current path (where is the .sch main file).
A library is always loaded (if found). It is the library attached to the
main file. it is created by eeschema when saving the main schematic file:
if the main schematic is mysheet.sch, the library called
mysheet.cache.lib is created and contains a copy of all the components
used in the schematic projet.
Its priority is the lower priority (it is loaded at the end of library list)
It is a security.
It is used when a component is not found in a library.
So a schematic can be loaded and displayed even if some libraries are
not found, or lost.
When I convert old orcad files (i have some old orcad SDT386 files) :
With orcad:
I create a library archive (in an old decompiled format which is an
ascii format) . Orcad creates the equivalent of the mysheet.cache.lib
with only the used components
I convert the orcad files in the aex format (an old orcad exchange
format which is the equivalent of your edif format in recent orcad
versions)
With the kicad converters for these old formats:
I convert the .aex files in kicad schematic files.
I convert the archive library in one library:
(the process is a bit tedious)
This library can be loaded as mysheet.cache.lib (assuming the main
shematic is mysheet.sch)
If i want have the hightest priority in the library list, rename it
something like orcad.lib, and modify the eeschema lib list
to put it in the first line of loaded libraries)
It will be loaded as ./orcad.lib (if it is in the current directory).
I think the most simple way to convert an orcad scheamtic project to a
kicad project is:
create a directory.
put the converted schematic files (and the board file) in this directory
with no .pro file.
and (2 ways of work)
- 1 For those who have 1 or 2 projetc to convert: Create only one
library (the .cache.lib file) from from an Orcad library archive
( and modify the schematic according to the current kicad libraries)
This is my way, because i do not want to handle 2 families of libraries.
Or if many projects must be converted:
2 - Convert all the orcad libraries, and put these libs in the default
kicad library path, because they will be used by many projects.
and Change the library list in eeschema config .
this will be create the missing .pro
This .pro can be copied without modification in all the others
orcad2kicad projects and therfore the work will be made once.
if this .pro replaces the kicad/template/kicad.pri it will become the
new default configuration.
Also I see there is a log window in KiCad project mgr.
What would it take to echo unresolved symbols when a schematic
is loaded or even the path of a resolved (found) symbol?
Great work todate.
See the Dick's answer
JP Charras
References