did a little testing with a field for DNP, my conclusion was
Fieldname – Fieldvalue
dnp – 1 //didnt get excluded
kicost:dnp – 1 //didnt get excluded
dnp – True //got excluded
kicost:dnp – True //didnt get excluded
if I understood it correctly all of the above should work for excluding parts
I failed to apply the fix that handles “kicost:variant” to the “kicost:dnp” field. So only “dnp” fields are handled correctly by KiCost 0.1.36. Or you can install from the Github repo to get the corrected program.
@devbisme
Hey Dave
could it be possible to make an option for “inverted variant”?
the usecase would practically be to have some parts always show up unless a specific variant is called.
for example I have a design with some optional input protection, when not needed I need to add some other parts in order to bypass it.
Currently I do like so.
all parts for input protection has a variant called INPUT_PROTECTION
all the bypass parts have a variant called NO_INPUT_PROTECTION
what I would suggest would be an option to add a “!” in front of the variant name to not add it when the variant is called.
like so:
input protection part: variant -> INPUT_PROTECTION
bypass parts: variant -> !NO_INPUT_PROTECTION
It’s something I can look at. Please enter it as an issue on the KiCost Github page.
It looks like we’re heading toward some type of Boolean expression involving the variant, e.g. “use this part if it’s in variant A but not in variants B or C”.
KiCost updated (v0.1.42) adding the functionalities:
Multiple BOM file to generate a single spreadsheet (useful in the case of a project with multiple boards or for control of the importation taxes);
Read CSV BOM (may be a hand-made). Allow to use older projects (or others EDA) and to add tools and other parts that is not components to the spreadsheet.
Downloaded Anaconda3, with pytthon 3.6.
Installed kicost with easy install.
I get the attached error message when i try to open my .xml BOM from kicad with kicost.exe.
Does anyone have a working .xml file I can try?
(base) C:\Users\m_mau\OneDrive\My Documents\Skole\Hibu\Gruppe 13\PCB\Strømregulator\Shunt TAE MR\ACS770_200A>kicost -i ACS770_200A.xml
Traceback (most recent call last):
File “D:\Anaconda3\lib\site-packages\kicost-0.1.43-py3.6.egg\kicost\kicost_gui.py”, line 31, in
import wx # wxWidgets for Python.
ModuleNotFoundError: No module named ‘wx’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “D:\Anaconda3\Scripts\kicost-script.py”, line 11, in
load_entry_point(‘kicost==0.1.43’, ‘console_scripts’, ‘kicost’)()
File “D:\Anaconda3\lib\site-packages\pkg_resources_init_.py”, line 572, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “D:\Anaconda3\lib\site-packages\pkg_resources_init_.py”, line 2755, in load_entry_point
return ep.load()
File “D:\Anaconda3\lib\site-packages\pkg_resources_init_.py”, line 2408, in load
return self.resolve()
File “D:\Anaconda3\lib\site-packages\pkg_resources_init_.py”, line 2414, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “D:\Anaconda3\lib\site-packages\kicost-0.1.43-py3.6.egg\kicost_main_.py”, line 37, in
from .kicost_gui import * # User guide.
File “D:\Anaconda3\lib\site-packages\kicost-0.1.43-py3.6.egg\kicost\kicost_gui.py”, line 33, in
raise ImportError(‘wxPython package not recognised.’)
ImportError: wxPython package not recognised.
You can install also using pip install git+https://github.com/xesscorp/KiCost.git
instead of pip install kicost
and get the last code version with this correction.
Yes, @devbisme fixed Mouse. But appear that Mouser are blocking multiple consecutive access. Try to use the --throttling_delay to give some time between two Mouser access.
News:
Thanks to GitHub user Max Maisel that help implementing the class on KiCost distributors, we are now releasing version 0.1.45 on PyPI.
We still working on improvements, minor issues and GUI, even some warning on Python 2.7. But I chose to release because this all issues related with not scrape results.
Please, gives us feed back and (code) contributions.