You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many symbols from Microchip are not parsed correctly, which causes them not to show any pin labels.
We can open a bxl package and look at the pins with:
var data = BxlDocument.ReadFromFile(fileName, BxlFileType.FromExtension, out var logs);
var result = new List<Package>();
foreach (var symbol in data.Symbols)
{
var package = new Package(symbol.Name);
package.Pins.AddRange(
symbol.Data
.Where(d => d is LibPin &&
(d as LibPin).Name.Text.ToUpperInvariant() != "NC" &&
(d as LibPin).Name.Text.ToUpperInvariant() != "DNC")
.Select(d => d as LibPin)
.Select(d => new Pin(d.Designator.Text, d.Name.Text))
);
result.Add(package);
}
This shows the pins with numbers, but with no name.
This is because BXL files are not always consistent apparently. They can sometimes have the name on the Component rather than the symbol pin.
Currently, the way we read pins is:
iterate over the Components
then to get the symbols, iterate the Component's AttachedSymbols
So as it's a nested loop, for those cases where the pin has no name you could fall back to the Component's Pins
I think it can get the proper pin matching the Symbol's Pin PinNum with the Component's Pin SymPinNum, the descriptor should match but I wouldn't bet on that for all cases.
Many symbols from Microchip are not parsed correctly, which causes them not to show any pin labels.
We can open a bxl package and look at the pins with:
Example file: PIC18C452-X_P and many others in https://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en537519
(PIC18 CAD/CAE Schematic Symbols @ https://www.microchip.com/development-tools/reference-designs/cad-cae-symbols if that link does not work)
This shows the pins with numbers, but with no name.
This is because BXL files are not always consistent apparently. They can sometimes have the name on the Component rather than the symbol pin.
Currently, the way we read pins is:
So as it's a nested loop, for those cases where the pin has no name you could fall back to the Component's Pins
I think it can get the proper pin matching the Symbol's Pin PinNum with the Component's Pin SymPinNum, the descriptor should match but I wouldn't bet on that for all cases.
component.Pins.First(compPin => p.SymPinNum == pin.PinNum)
If the current method does not have a value for the Name property, it should try to match as above.
The text was updated successfully, but these errors were encountered: