Hi Daniel, I needed the Do not place attribute properly propagated to footprints as part of some work on the BOM exporter I have been doing. I went ahead and added a toggle to the 3D viewer for showing/hiding models for footprints with DNP set.
Mike On Mon, Apr 10, 2023 at 9:34 AM Seth Hillbrand <[email protected]> wrote: > Hi Daniel- > > Your access it like this: > > for fp in b.Footprints(): > p = fp.GetProperties() > if 'dnp' in p.keys(): > print("DNP: " + fp.GetReference()) > > > On Mon, Apr 10, 2023, 9:09 AM 'Daniel O'Connor' via KiCad Developers < > [email protected]> wrote: > >> Hi, >> I'd like to modify a plugin to honour the DNP flag - it runs in pcbnew as >> an action plugin - however I can't see how I can get the flag. >> >> Does anyone know how I can do that? (or if it's possible :) >> >> I also wonder how hard it would be to add a flag to the 3d viewer to not >> display parts which have the DNP flag fitted. >> >> >> Also, while looking through the Kicad code to try and see how it worked I >> found this in kicad/cli/command_export_sch_bom.cpp: >> bomJob->m_groupSymbols = m_argParser.get<bool>( ARG_GROUP_SYMBOLS ); >> bomJob->m_groupSymbols = m_argParser.get<bool>( ARG_EXCLUDE_DNP ); >> >> It seems like the first assignment is dead (assuming there aren't any >> side effects).. >> >> Thanks. >> >> -- >> Daniel O'Connor >> "The nice thing about standards is that there >> are so many of them to choose from." >> -- Andrew Tanenbaum >> >> -- >> You received this message because you are subscribed to the Google Groups >> "KiCad Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/a/kicad.org/d/msgid/devlist/DFDEF3E1-A90F-4CC9-9206-D53F1467DBDD%40dons.net.au >> . >> > -- > You received this message because you are subscribed to the Google Groups > "KiCad Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/a/kicad.org/d/msgid/devlist/CAFdeG-rRpb%3DVcOpbUryGMY3Mfg87LkQb5d2aiM8wk9z-67Nnng%40mail.gmail.com > <https://groups.google.com/a/kicad.org/d/msgid/devlist/CAFdeG-rRpb%3DVcOpbUryGMY3Mfg87LkQb5d2aiM8wk9z-67Nnng%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "KiCad Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/kicad.org/d/msgid/devlist/CANPyyuMNBsJsxRV_72gK4TzcDPfbTaD%2B6ged-qtZt03DfSVaNw%40mail.gmail.com.
