Want to know how to use python to modify the value of the field name of the part in the schematic?

Want to know how to use python to modify the value of the field name of the part in the schematic?

Are you sure those fields even exist? This may be a strange question to you, but those are non standard names and it is quite possible they are only defined in: Schematic Editor / File / Schematic Setup / General / Field Name Templates. Any field names you add there appear to exist on all schematic symbols, but they only get added when the values for the field is filled in.

Re Python code to change Text…

You can do it with most Text Editors (search & replace).

Given you ask about Python code to do it… Several Python String manipulation tools to do it - which one depends on just what’s wanted.

I recently coded a Python App to do it on Kicad files. Video example below demo’s Python Walk-thru-DIR-Files/Search-Replace

Important! How a user sets it up and what’s selected and the Search text requires consideration or results may not be as hoped for.
I show being specific and not being specific…

Yes, the Fields in the Schematic file get changed (screenshot)

Screen Shot 2023-10-14 at 10.54.02

But the supervisor wants to use the Excel file format to modify the part attributes, so he can only rely on python.

image

propinquity. Thanks you!
It seems that I need to try out how to use python to modify part attributes in Kicad first.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.