← Back to team overview

kicad-developers team mailing list archive

Re: Run-time expression eval in text fields

 

Rather than wont fix, we could use fix committed since we now have the
auto placer.  Technically, the fact that you cannot have different field
positions in library symbol units means it wont be truly fixed until the
library symbol file format is available during version 6 development.
You could just leave it open as well.  I really don't have a strong
preference.  The version of kicad reported in this bug is pre 4.0.

On 1/18/2018 1:50 PM, Jeff Young wrote:
> I think Jose is on to something here.  I went back and looked at a bunch
> of my schematics and about 90% of the refs and values are hand-placed.
> 
> Now I’m a lot more OCD than most, but if the auto placement doesn’t work
> for someone, then they must be too. ;)
> 
> Shall I close the bug as Won’t Fix?
> 
> 
> 
>> On 18 Jan 2018, at 00:37, José Ignacio <jose.cyborg@xxxxxxxxx
>> <mailto:jose.cyborg@xxxxxxxxx>> wrote:
>>
>> I don't think fixing this is even necessary, fields are auto-placed in
>> eeschema master since last year. And if I cant leave it to the
>> autoplacer i usually want to manually tweak the location of the field
>> once in the schematic anyway, the default placement would be almost
>> always wrong, this goes for footprints too.
>>
>> On Wed, Jan 17, 2018 at 4:14 PM, Jeff Young <jeff@xxxxxxxxx
>> <mailto:jeff@xxxxxxxxx>> wrote:
>>
>>     Hi Wayne,
>>
>>     I don’t think it’s as simple as fixing it in the file format.  If
>>     we add field instances for each unit, then we also have to add
>>     “shared” vs. “specific” radio buttons in the Edit Fields dialog,
>>     and that's going to open a whole ‘nother can of worms.
>>
>>     But I’m not sold on expressions for this either (or even that we
>>     /need/ to fix it); more just brainstorming...
>>
>>     Cheers,
>>     Jeff.
>>
>>
>>>     On 17 Jan 2018, at 19:08, Wayne Stambaugh <stambaughw@xxxxxxxxx
>>>     <mailto:stambaughw@xxxxxxxxx>> wrote:
>>>
>>>     Jeff,
>>>
>>>     Using expression evaluation seems like overkill in this case. 
>>>     Even if
>>>     you do manage to design something that doesn't make a complete
>>>     mess of
>>>     the source code, you would still have to get buy in from the symbol
>>>     library devs to go back and add the expressions to every symbol with
>>>     multiple units where per unit field positions would be helpful. 
>>>     I'm not
>>>     going to ask them to do that for a temporary fix.  Given that the
>>>     very
>>>     first thing I'm going to work on after the v5 release is the new
>>>     symbol
>>>     library file format, I just don't see how implementing this would be
>>>     helpful.  I'm not opposed to expression evaluation in general,
>>>     just not
>>>     to fix a broken file format.
>>>
>>>     Cheers,
>>>
>>>     Wayne
>>>
>>>     On 1/17/2018 1:49 PM, Jeff Young wrote:
>>>>     Hi Wayne,
>>>>
>>>>     But even for 6, does this issue warrant it?  Having an
>>>>     expression evaluator would remove the need.
>>>>
>>>>     (Mind you, it would still be overkill for this issue if the
>>>>     expression evaluator didn’t have other uses.  That was the
>>>>     reason for my query.)
>>>>
>>>>     Cheers,
>>>>     Jeff.
>>>>
>>>>
>>>>>     On 17 Jan 2018, at 18:31, Wayne Stambaugh <stambaughw@xxxxxxxxx
>>>>>     <mailto:stambaughw@xxxxxxxxx>> wrote:
>>>>>
>>>>>     Jeff,
>>>>>
>>>>>     Adding separate field locations for each symbol unit requires a
>>>>>     symbol
>>>>>     library file format change which is going to happen after v5 is
>>>>>     released.  Please do not change any of this code because it
>>>>>     will just
>>>>>     get replaced when this occurs.
>>>>>
>>>>>     Cheers,
>>>>>
>>>>>     Wayne
>>>>>
>>>>>     On 1/17/2018 12:27 PM, Jeff Young wrote:
>>>>>>     There’s a bug[1] that complains that the user can’t reposition
>>>>>>     a reference or value differently for different units that
>>>>>>     might be different sizes.  (You can do this on the eeschema
>>>>>>     canvas, but not in the library, so you have to do it each time
>>>>>>     you use one of the units.)
>>>>>>
>>>>>>     It occurred to me that one could accomplish this using
>>>>>>     existing stuff if we had a (very simple) evaluator for text
>>>>>>     fields at runtime.  They could then add a text field to their
>>>>>>     units (marked shared-between-units or not as required), and
>>>>>>     set the value to something like “%REF” or “%VALUE”.  The
>>>>>>     expression evaluator could even be as simple as doing those
>>>>>>     two replacements, or maybe looking up any field value or
>>>>>>     something.
>>>>>>
>>>>>>     Anyway, I’m not sure this issue warrants it, but if it had
>>>>>>     other uses it might be worth doing (whereas adding separate
>>>>>>     REF and VALUE fields per unit and giving them
>>>>>>     shared-between-units flags, etc., would be more work than this
>>>>>>     bug probably warrants).
>>>>>>
>>>>>>     Thoughts?
>>>>>>
>>>>>>     [1] https://bugs.launchpad.net/kicad/+bug/1334502
>>>>>>     <https://bugs.launchpad.net/kicad/+bug/1334502>
>>>>>>     _______________________________________________
>>>>>>     Mailing list: https://launchpad.net/~kicad-developers
>>>>>>     <https://launchpad.net/~kicad-developers>
>>>>>>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>>>     Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>>     <https://launchpad.net/~kicad-developers>
>>>>>>     More help   : https://help.launchpad.net/ListHelp
>>>>>>     <https://help.launchpad.net/ListHelp>
>>>>>>
>>>>>
>>>>>     _______________________________________________
>>>>>     Mailing list: https://launchpad.net/~kicad-developers
>>>>>     <https://launchpad.net/~kicad-developers>
>>>>>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>>>     Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>     <https://launchpad.net/~kicad-developers>
>>>>>     More help   : https://help.launchpad.net/ListHelp
>>>>>     <https://help.launchpad.net/ListHelp>
>>>>
>>
>>
>>     _______________________________________________
>>     Mailing list: https://launchpad.net/~kicad-developers
>>     <https://launchpad.net/~kicad-developers>
>>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>     Unsubscribe : https://launchpad.net/~kicad-developers
>>     <https://launchpad.net/~kicad-developers>
>>     More help   : https://help.launchpad.net/ListHelp
>>     <https://help.launchpad.net/ListHelp>
>>
>>
> 


References