-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make "Footprint" and "Value" fields optional #167
Comments
I came here for the same issue We have a proper itemised inventory with our own codes. Having to to see this completely useless column is an eyesore on an otherwise gorgeous plugin Edit: |
While I plan to implement this as a plugin option, you can do this already using some custom js. var customRuleIndexes = [];
function hideColumn(column) {
customRuleIndexes.push(document.styleSheets[0].insertRule(
`td:nth-child(${column}),th:nth-child(${column}) { display: none }`,
document.styleSheets[0].cssRules.length
));
}
EventHandler.registerCallback(IBOM_EVENT_TYPES.BOM_BODY_CHANGE_EVENT, (event) => {
while (customRuleIndexes.length > 0) {
document.styleSheets[0].deleteRule(customRuleIndexes.pop());
}
var numCheckboxes = event.args.checkboxes.length;
hideColumn(numCheckboxes + 3); // Value
hideColumn(numCheckboxes + 4); // Footprint
}); This will hide Value and Footprint columns. Tweak the indexes to account for extra fields or hide other columns as needed. |
Hey, thank you for this! This has been a great option for me.. And also thank you a ton for this GREAT plugin! By far the best plugin for KiCad! |
What am I doing wrong when I cannot make the user.js file work as described? |
I kind of misplaced my crystal ball so help me out here. Do you see any effect at all when you add user.js file and regenerate bom? If you don't see any effect then try putting If you see alert message but something else goes wrong when you put the code snippet to hide columns then check browser console log for any errors and copy them here. |
Yes, file name and path is correct. |
I downloaded and installed it from Github today, using this link: https://github.com/openscopeproject/InteractiveHtmlBom/releases/download/v2.3/InteractiveHtmlBom.zip This is shown in the header of the generated web page: There is a possibility that ibom was already installed on this PC but not visible in KiCad after a recent KiCad upgrade. (I have used ibom before but changed PC some months ago - so am no longer sure if it was on this or previous PC.) But as I did not find ibom in the recommended install directory, I proceeded with download/install, and the icon appeared in PCBnew as expected. Is there any way I can verify that it is indeed version 2.3 I am running, and not a previously installed one (maybe sitting in an other directory)? |
v2.3 is NOT what you want, you need newer version which is not released yet. Get it from this link https://github.com/openscopeproject/InteractiveHtmlBom/archive/master.zip Remember to delete old version before installing new one and restart kicad.
That shows pcb file date (either from metadata or filesystem update date) |
That's more like it! 👍 Thank you for this great tool and for helping me so promptly today! |
Hi guys! I've been using the awsome tool for a few days and now i'm trying to apply the solution that qu1ck wrote on #88 but i'm having the same problem ArnieO had. I think the user.js file is in the right place but i'm not seeing the alert('test'). See the print below: I'm using the files from the .zip file that qu1ck suggested to ArnieO. Any ideas? Thanks! |
Do you get a bom at all? Can you grep the output file for Also it's better to put plugin in home directory |
Hi qu1ck! Thanks for the reply! I did some more testing and changed the plugin installation location. Using the same as the wiki. On my Debian 9, I'm using Kicad 5.0 and I get the following results:
On my Windows 10, i'm using Kicad 5.1 and get this results:
So, maybe it's a issue with my KiCAD version or my old Debian. I'm using the same files on both OS, but i've also realized that, on my Debian, I can't see the icon for the dynamic hiding and reordering of columns and in Windows i can see it. Check the print below of the Debian generated BOM: It's not a problem for me to do my work in Windows. So, i guess this solves the problem. If you need me to test something else, let me know. By the way, the code on #88 doesn't really solves my problem. What i really need is something like this: use a checkbox to choose what items would be highlighted on the board. Do you recall if anybody has opened an issue about something like this? Once again, thanks for the reply! This plugin is amazing! Awesome job, qu1ck! |
It sounds like on your debian install you've put a release version of the plugin instead of development version. Last released version doesn't have customization support, you need latest from master branch.
This already exists, use |
I'll do more tests in Debian today and get back to you. Yes! Thanks qui1ck! |
Hi qu1ck! I have found my problem. For some reason, the plugin files i've been using were not the ones at Thanks! |
I can hardly understand what you are asking, what it has to do with user.js or this 3 year old issue. Please open a new issue and describe clearly what you want to achieve and what you have tried. If you are asking about how to make some extra field permanently enabled you can do it once and save current settings in a global config. |
And also a bit difficult to understand which comment this posting relates to! 😅 |
When creating BOMs with the extra field named for example "Details", I have no need for "Footprint" or "Value" fields..
For example my "Details" field will include "Capacitor Ceramic Chip SMD 100nF 25V 0805 5%"..
It would be great to disable "Footprint" and "Value" fields..
Also, "Footprint" field reveals footprint library item name which may be sensitive or ugly such as "IPC-DO-214AB(SMC)"
The text was updated successfully, but these errors were encountered: