kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #38999
Re: $comp file format question
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
jp charras <jp.charras@xxxxxxxxxx>
-
Date:
Mon, 14 Jan 2019 15:25:20 +0100
-
In-reply-to:
<090601d4ac10$fefd14c0$fcf73e40$@documenteddesigns.com>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
Le 14/01/2019 à 14:56, Brian Piccioni a écrit :
> JP
> Thanks for the explanation.
>
> Is the AR field documented anywhere? Are there any other undocumented .sch
> fields?
Not I am aware of.
>
> It would seem to me that the extraneous/obsolete AR fields should be deleted
> when the file is saved since they are no longer need for undo commands.
>
> Regards
>
> Brian
>
No: saving files during a session is usual.
They cannot be cleaned as long as undo stacks are not empty.
The can be cleaned only just after loading the schematic project files
(i.e. when the undo stack is empty in all sheets.)
> -----Original Message-----
> From: Kicad-developers
> <kicad-developers-bounces+brian=documenteddesigns.com@xxxxxxxxxxxxxxxxxxx>
> On Behalf Of jp charras
> Sent: January 14, 2019 2:58 AM
> To: kicad-developers@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Kicad-developers] $comp file format question
>
> Le 13/01/2019 à 17:50, Brian Piccioni a écrit :
>> Hello
>> I am looking at damaged schematic file someone sent me. It has fields
>> like this
>>
>>
>>
>> $comp
>>
>> L Device:LED_ALT D?
>>
>> …
>>
>> …
>>
>> AR Path="/5C0355BF/5C061BDB" Ref="D?" Part="1"
>>
>> AR Path="/5C048F20/5C061BDB" Ref="D103" Part="1"
>>
>>
>>
>> I suspect the problem is that a hierarchical sheet was deleted before
>> annotation and the sheet was not “cleaned up” by KiCad so the “ghost”
>> of the sheet remains in the file format. I think I have seen this
>> before and might have raised it as a bug. Eventually I am going to try
>> and replicate this issue and if I can I’ll file a bug report.
>>
>>
>>
>> Nevertheless, when I consult the file formats PDF linked here
>> http://kicad-pcb.org/help/file-formats/ (pages 3 and 4) I see no
>> definition for the AR field. There is no date/version number on the
>> PDF, so I assume it is the most recent one, but I don’t know for sure.
>>
>>
>>
>> Is the file formats document link pointing to an obsolete document?
>>
>>
>>
>> Can someone kindly point me to where the AR field is documented?
>>
>>
>>
>> Thanks
>>
>> Brian
>>
> I forgot to define the AR fields in the file formats document.
>
> AR is the alternate reference used in complex hierarchies.
>
> In simple hierarchies the F0 field contains the component reference.
> But in complex hierarchies, there are more than one reference:
> for each instance of the shared sheet, a specific reference is needed.
> The AR line defines the reference and unit for each sheet path.
>
> When switching to a given instance (known by its sheet path) of a shared
> sheet, the corresponding AR is copied to the F0 field of every component.
>
> AR are cleaned only when clearing the full annotation, not when deleting a
> sheet instance.
> Otherwise when undoing a deleted sheet, AR references will be lost (as they
> are living in a other hierarchical sheet, or many other hierarchical
> sheets).
>
> There are no issue with no existing sheet paths, they are just not used,
> like many other symbol fields.
>
> --
> Jean-Pierre CHARRAS
--
Jean-Pierre CHARRAS
Follow ups
References