← Back to team overview

kicad-developers team mailing list archive

Re: Run-time expression eval in text fields

 

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> 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
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References