Output to PADS PCB Netlist Broken?

What did you try?
What fails?
:neutral_face:
You’re problem report is rather broad and unspecific…

PS: the bugfix is still not implemented… tested in:

Application: kicad
Version: (2017-02-10 revision 1bcbbb4)-makepkg, release build
Libraries: wxWidgets 3.0.2
libcurl/7.51.0 OpenSSL/1.0.2j zlib/1.2.8 libssh2/1.8.0 nghttp2/1.16.1 librtmp/2.3
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW

Hi Joan thank you for you reply, I need to generate Net list in PADS format , below is what i tried to do

After completing the schematics, I attempted to create the netlist as follow

under the Net list menu i have currently four options and they are Pcbnew (selected), Orcad CADStar and Spice (all three are not selected)
I selected Add Plugin
under Plugins menu I selected Browse Plugins
Selected the folder Scripting, then selected Plugins
I chose netlist_form_pads-pcb.xsl
this file gave me a NETLIST command line xsltproc -o “%O” “C:\Program Files\KiCad\bin\scripting\plugins\netlist_form_pads-pcb.xsl” "%I"

I assigned a name to the file " NET_to_PADS"

Now I have a new tab under the net list menu called NET_to_PADS
I selected the option (default format)
I selected Generate , gave option for file name and i left the default name then i clicked save
the output of the file is an XML file, which i have no what to do with it ,and that is where i stopped

I look forward to hear you response

I got 2 outputs for the same workflow.
One is .xml file and the other a .pads file.
The pads file still has the problematic string at the front that needs to be modified/replaced according to this post further up (see link at bugtracker for details)

If you do this more often you probably want to modify the xsl file, from this:

...
<xsl:template match="/export">
    <xsl:text>*PADS-PCB*&nl;*PART*&nl;</xsl:text>
...

to this:

...
<xsl:template match="/export">
    <xsl:text>!PADS-POWERPCB-V2.0-MILS!&nl;*PART*&nl;</xsl:text>
...

I’m not getting two files, only XML file is what i’m getting.

PCB WIZ comment, i’m not sure how to use the information

Alos what does “if you have correctly mapped eeschema.footprints to PADS …”

Thank you again for your help

Sorry, don’t use this stuff, so I didn’t tell all I did.

In the PADS dialog, my command line looks like this:

xsltproc -o “%O.pads” “C:\Program Files\KiCad\bin\scripting\plugins\netlist_form_pads-pcb.xsl” “%I”

If you just got -o “%O” in that string, the pads file will have no extension at all, but the same name as the xml file.

I guess it means if your KiCAD (ref<>fp) association in the pads file like this:

...
*PART*
 U103 SOTx:SOT-353
 U104 SOTx:SOT-323
 Q101 SOTx:SOT-363
 Y101 SMDx:Crystal_3.2x1.5_2P
 U101 xSOP:xSSOP-10-0.5-Wb3-Wp5
 U102 xSOP:xSSOP-8-0.65-Wb3-Wp4
...

is sufficiently modified to what PADS want’s to see there for the latter part of each line (how does PADS assign footprints - I have no idea) then you got a winner.
If you screw it up, PADS won’t know what to do with the Reference designators in the net list further down, as the footprints are unknown to it and probably throw a hissy-fit about how you could feed it such erroneous data.
:wink:

[quote=“Joan_Sparky, post:19, topic:4511”]

Thank you Joan, I have to buy beer one day :slight_smile: I copied and pasted the line command you sent and still KiCad generated one file which is XML type, I tried both the original script file “netlist_form_pads-pcb.xsl” and also i copied and pasted the original file in different directory ,then I edit the script file to include what PCB Wiz suggested which is changline line 18 from PADS-PCB to !PADS-POWERPCB-V2.0-MILS!

I"m stuck and not sure how to proceed from here , is there another script file that I should use that i missed

Thank you again

Hm… I don’t know how this works under the hood really.

When I try any of the other options in that dialog there is no extra .xml file created.
CadStar, OrCAD… the files for those are .frp and .net respectively.
Only for the PADS I get the .xml and depending on the command line setting a file without or with .pads extension.

I’m using a nightly version of KiCAD though, dunno if this is different for the normal v4 versions?

Question, do you select a different folder in that destination dialog than the project folder?
I don’t change anything in there, just hit [Save] actually…

The .pads file then is {project-name}.pads and located in the project folder, right next to {project-name}.pro, {project-name}.sch and {project-name}.kicad_pcb

The way the custom exports works is that KiCad always generates an XML corresponding to the net list. That XML file is then processed by xsltproc, which takes as input the XML file and transform it according to the XSL file, hence the name “XSLT processor”.

The XML file is not the intended final output, it is the “intermediate file” mentioned in the docs.

Assuming that xsltproc ran correctly, then there should be a file somewhere on your PC with the name specified by “%O.pads” or whatever. Depending on your OS and settings the file might be easy or hard to find.

Personally I check this sort of thing by running from the command line, to ensure I know where everything is and see all the output. xsltproc is great for programmers but a very unfriendly tool to inflict on regular users, but there you are.

XSLT (Extensible Stylesheet Language Transformations) is a language for transforming XML documents into other XML documents

2 Likes

I had the same issue. From what I can tell it looks like KiCAD was producing the PADS netlist but it was a file with no extension with the same name as every other file in my project root directory so I just couldn’t find it.

The script I wrote works pretty good for me. I can’t upload the .exe as it’s too big. But if you install python you can run the attached script. It makes a nicer formatted netlist anyways. You do have to manually input footprint names though.

KiCAD2PADS.py (5.5 KB)

Thank you all, but I’m not familiar with scripting and python . Is there detailed instruction somewhere that i can follow,

thanks again to all

Hi Joan, what is nightly Version ?

thanks

it’s a development version… you can get it here (at least for windows):

But it’s not supposed to be used for production, as there can be stability issues (or better there are) and bugs. It’s the newest stuff that the devs want to be tested by a wider audience essentially. So don’t use it for anything, unless you know what you’re doing.

1 Like

Joan, thank you for the feedback, If I got this right then:

** After I create the design in version 4.0.4

** I will archive the project ,
** Install nightly version on a old computer to make sure i don’t corrupt the production version
** open the archived project with the nightly version
** Then hopefully i can create the PADS file

does this sound right to you ?

Have a good day

Sounds about right, but I don’t get why you can’t go hunting for that file on your system?

As has been mentioned, that xsltprog program is being called and does what it’s being told.
Should be no difference between the latest stable and the latest (buggy) nightly there, really.
That code currently is not changing afai-aware.
You might do this all for nothing…

Which OS you’re on?
Windows?

What is the xsltprog command line in the PADS export dialog?
Still this?

xsltproc -o “%O.pads” “C:\Program Files\KiCad\bin\scripting\plugins\netlist_form_pads-pcb.xsl” “%I”

Where is your KiCAD installed?
Where is your project located?

What happens if you change the command line to this?

xsltproc -o “C:\Users\{YOUR USER NAME HERE}\AppData\Roaming\kicad\test.pads” “C:\Program Files\KiCad\bin\scripting\plugins\netlist_form_pads-pcb.xsl” “%I”

Do you get a test.pads file in C:\Users\{YOUR USER NAME HERE}\AppData\Roaming\kicad?
If so, you got some kind of access problem with the location the xsltproc.exe wants to write to.

I for example can’t just use “C:\test.pads” - if there is an error message, it’s not long enough visible for me to check it. The file is not being created in that location.
If I instead use “E:\test.pads” it works… that’s why all my data is on E:, an extra partition.

Next thing I would like to know if your FileExplorer - if you’re under Windows - does hide extensions for known file types?
Maybe it even hides files without extension, thinking they could be system files?

2 Likes

I guess my beer bottle that i promised you to buy last week will become a 6 pack, I can’t thank you enough. you saved my neck.
Joan thank you so much.

So I’m still having problems with this in KiCad 5.1.4 running on Windows. xlstproc is not installed with KiCad.

Follow instructions here to download and install it: http://mathbook.pugetsound.edu/doc/author-guide/html/installing-xsltproc.html

When you update Windows PATH environment variable, be sure to set the system version, not the user version.

I’m still not able to run it from the netlist dialog in EESchema. Similar to the other users on this thread, it creates the .xml file, but no other output files. I was able to run it from the command line by replacing %O with the desired output filename and %I with the input file name, which is the .xml file.

At least in Windows, xsltproc.exe comes together with KiCAD, you can find it on KiCad/bin/xsltproc.exe

Application: Pcbnew
Version: (5.1.4)-1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.68.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.61.1
Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

Thanks Der.ule, xlstproc is there. I guess it’s not in my path. I can run the script from command line from the Kicad directory.

However, I still can’t get it to work from the netlist dialog, even when I specify input and output files instead of %I and %O. I just get the .xml file, no .asc file.

1 Like

A post was split to a new topic: Output to PADS netlist export broken