-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
All LCSC numbers appear on silkscreen #546
Comments
I'm new to this plugin and suffering from the same problem. Is this behavior new that checking out to an older release will fix this? |
@luftaquila you are right, I just tried with version 2024.07.02 and those numbers do not get added to the silkscreen. My steps:
After assigning part numbers with the most recent version, the numbers are immediately visible on the silkscreen. |
So I fixed it with this horrible thing in 134 def set_lcsc_value(fp, lcsc: str):
135 """Set an lcsc number to the first matching propertie of the footprint, use LCSC as property name if not found."""
136 lcsc_field = "LCSC"
137 for field in fp.GetFields():
138 if re.match(r"lcsc|jlc", field.GetName(), re.IGNORECASE) and re.match(
139 r"^C\d+$", field.GetText()
140 ):
141 lcsc_field = field.GetName()
142 fp.SetField(lcsc_field, lcsc)
# Added this:
143 for field in fp.GetFields():
144 if re.match(r"lcsc|jlc", field.GetName(), re.IGNORECASE) and re.match(
145 r"^C\d+$", field.GetText()
146 ):
147 field.SetVisible(False) If this actually gets merged pls remove this second loop or at least the regex :) |
I have the same problem. Kicad 8.05 and latest Plugin version. |
I did a bit of testing. This issue does not happen when the LCSC number is set from the schematic, something I often do. But these fields are appearing for all components which I select after the fact using the GUI of this plugin. |
PR submitted to fix this issue based on your snippet, @Carbon225. New LCSC fields will be marked as hidden but existing fields will not be touched. If your PCB is already messed up and you don't want to manually go through and hide the LCSC field on every component, try running the following snippet at the scripting console:
You will need to copy-paste one line at a time. Pasting the whole snippet doesn't seem to work. Press enter twice after |
@whmountains thanks for the PR I haven't tested it yet, but you snippet works.
|
@Bouni hasn't released a new version yet. See my last comment and the clarification from BenRoe for a one-time fix. You could also try downgrading to 2024.07.02. |
I'll release a new version in the next few hours. It's still 6am at the moment, so be patient please 😅 |
@Bouni All ok take your time, 6.am on my side too XD |
I don't know if this is a feature but after assigning part numbers they all show up on the silkscreen which looks like this:
I tried searching online how to bulk hide these fields but found no way (other that scripting).
Using Edit -> Edit Text & Graphics Properties does not work on these fields.
If I select ALL filters in that menu and set Visible -> False, all graphics disappear except these LCSC numbers.
Is this something that everyone deals with or am I the only one with this problem?
I'm using kicad 8.0.5 on ubuntu 22.
The text was updated successfully, but these errors were encountered: