Regression on using subpath for hierarchical sheets

Bug #1683921 reported by Sebastien
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Wayne Stambaugh

Bug Description

In kicad 4.0.6-1 it is possible to create a new hierarchical sheet with a path inside the name, this is useful to organize large projects in subfolders.

Inside master branch this is not possible anymore, sheets are only found if at the root path of projects.

Revision history for this message
astroelectronic@ (astroelectronica-deactivatedaccount) wrote :

Hi.

You can to invoke a schematic sheet from hierarchical block.

In name sheet field you must to write ../folder/schematic.sch

Kicad then ask you if you want to use these schematic because sheet it's not empty.

You can see a example in my personal work.

https://github.com/astroelectronica/AE003S025

Sometimes you can have problems if you're using ubuntu and his permissions. I'm actually working with two HDD because that.

Best regards.

Revision history for this message
Sebastien (turdusmerula) wrote : Re: [Bug 1683921] Re: Regression on using subpath for hierarchical sheets

Il will make a new test from trunk to see the status of this regression.

I have a project using those kind of relative path but with my last try I
could not open it with the trunk version.

Thank you :)

2017-05-10 18:29 GMT+02:00 astroelectronic@ <email address hidden>:

> Hi.
>
> You can to invoke a schematic sheet from hierarchical block.
>
> In name sheet field you must to write ../folder/schematic.sch
>
> Kicad then ask you if you want to use these schematic because sheet it's
> not empty.
>
> You can see a example in my personal work.
>
> https://github.com/astroelectronica/AE003S025
>
> Sometimes you can have problems if you're using ubuntu and his
> permissions. I'm actually working with two HDD because that.
>
> Best regards.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1683921
>
> Title:
> Regression on using subpath for hierarchical sheets
>
> Status in KiCad:
> New
>
> Bug description:
> In kicad 4.0.6-1 it is possible to create a new hierarchical sheet
> with a path inside the name, this is useful to organize large projects
> in subfolders.
>
> Inside master branch this is not possible anymore, sheets are only
> found if at the root path of projects.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1683921/+subscriptions
>

Revision history for this message
mifi (fierst42) wrote :

My 2 cents:

I accidentally created a duplicate bug report (now closed and linked to this one) that has more information (#1689763). This problem is reproducible and I gave a procedure in my description to reproduce the behaviour.
See https://bugs.launchpad.net/kicad/+bug/1689763 for more information.

This problem is not caused by permission settings, because, in my case, the sub schematic was created by EEschema itself. I checked all permissions and ownership. EEschema did work fine with its new subschemtaic directly after creation as long as I kept the top level schematic open. After the session was closed, it refused to reopen the TOP LEVEL schematic.
m

Changed in kicad:
status: New → Confirmed
assignee: nobody → Wayne Stambaugh (stambaughw)
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 747583606bfacef6bd4e934faec98326b022fae6
https://git.launchpad.net/kicad/patch/?id=747583606bfacef6bd4e934faec98326b022fae6

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I just committed a fix for this. Please let me know if doesn't resolve your issue.

Revision history for this message
astroelectronic@ (astroelectronica-deactivatedaccount) wrote :

Try to include path libraries to folders with these schematics that you want to use.

Usually I work with hierarchical blocks calling to sheets located in other folders and always runs correctly.

In filename textbox of hierarchical sheet "../folder_name/file_name.sch"

Good luck!

Revision history for this message
mifi (fierst42) wrote :

Yes, your fix fixed it, Wayne. Thanks.
m

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

There is still an issue for nested project structures. I'm working on a complex system comprising of many boards and other assemblies connected with a wiring harness. Currently I have one 'top level' project where each hierarchical sheet is another project in its own sub folder, eg:

Top_Level/
├── Top_Level.kicad_pcb
├── Top_Level.pro
├── Top_Level.sch
├── Sheet_1/
│ ├── Sheet_1.kicad_pcb
│ ├── Sheet_1.pro
│ └── Sheet_1.sch
└── Sheet_2/
    ├── Sheet_2.kicad_pcb
    ├── Sheet_2.pro
    └── Sheet_2.sch

If I open Sheet_2.pro in the KiCad manager, and add a hierarchical sheet named "input_protection.sch" to "Sheet_2.sch", the tree should now look something like this:

Top_Level/
├── Top_Level.kicad_pcb
├── Top_Level.pro
├── Top_Level.sch
├── Sheet_1/
│ ├── Sheet_1.kicad_pcb
│ ├── Sheet_1.pro
│ └── Sheet_1.sch
└── Sheet_2/
    ├── input_protection.sch
    ├── Sheet_2.kicad_pcb
    ├── Sheet_2.pro
    └── Sheet_2.sch

This works fine when "Sheet_2.pro" is open however when I open "Top_Level.pro", eeschema cannot find input_protection.sch since its looking in the directory Top_Level/, not Top_Level/Sheet_2/.

Wouldn't it be better to search for hierarchical sheets relative to the path of file referencing it? I believe this would solve my issue, and still work as expected for "normal" project structures.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Does Top_Level.sch have a two sheets, one with a file of Sheet_1/Sheet_1.sch and the other with Sheet_2/Sheet_2.sch? If so, this should work just fine. If so, this has already been fixed in the master branch and stable version 4.0.7. I have no idea what version of KiCad you are using since you did not include your version information.

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

Hi,

Sorry for super late reply, I didn't get a email notification...

Also sorry for not including any version info. I'm currently using 4.0.7 downloaded from KiCad website on MacOS 10.13.1.

What you asked is correct, I have attached an example project structure using the file names I used originally. Open Sheet_1 and Sheet_2 projects first, notice the hierarchical sheet in Sheet_2.sch and its contents. Now open Top_Level (notice error message) and see that Sheet_1 and Sheet_2 are included. These work fine, but trying to open Sheet_2>input_protection doesn't work as I'd expect, it brings up a blank sheet.

I hope this made sense. I know its a niche usage case.

Regards,
Michael

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Michael, did this open with the stable 4 branch?

On 11/29/2017 04:11 PM, Michael Kavanagh wrote:
> Hi,
>
> Sorry for super late reply, I didn't get a email notification...
>
> Also sorry for not including any version info. I'm currently using 4.0.7
> downloaded from KiCad website on MacOS 10.13.1.
>
> What you asked is correct, I have attached an example project structure
> using the file names I used originally. Open Sheet_1 and Sheet_2
> projects first, notice the hierarchical sheet in Sheet_2.sch and its
> contents. Now open Top_Level (notice error message) and see that Sheet_1
> and Sheet_2 are included. These work fine, but trying to open
> Sheet_2>input_protection doesn't work as I'd expect, it brings up a
> blank sheet.
>
> I hope this made sense. I know its a niche usage case.
>
> Regards,
> Michael
>
> ** Attachment added: "Top_Level.zip"
> https://bugs.launchpad.net/kicad/+bug/1683921/+attachment/5016390/+files/Top_Level.zip
>

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

@Wayne, Is there a precompiled download link for this? I don't have a dev environment set up on my Mac. Downloaded and installed http://downloads.kicad-pcb.org/osx/stable/kicad-4.0.0.dmg, the issue is still there.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

If your sample project didn't load with version 4 then it likely never
loaded with any version of KiCad. This bug report was to fix an issue
with the new schematic plugin code that broke existing designs. What
you are requesting is something altogether different and should be
submitted under a different bug report. I don't think I would terribly
difficult to provide the behavior you are looking for but I doubt I will
have time to work on it now that we are in feature freeze for the stable
5 release.

On 12/02/2017 10:27 AM, Michael Kavanagh wrote:
> @Wayne, Is there a precompiled download link for this? I don't have a
> dev environment set up on my Mac. Downloaded and installed
> http://downloads.kicad-pcb.org/osx/stable/kicad-4.0.0.dmg, the issue is
> still there.
>

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

Apologies if I hijacked this bug report, however in the master branch nightlies no part of the schematic is loaded, the attached error message is displayed. Clicking okay leads Eeschema to display "noname.sch".

In the <=4.0.7 stable releases it loads all other parts of the schematic just not the input_protection.sch sheet. This is probably why I commented on this bug report as I thought they were related.

I shall create a separate bug report for this.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 12/2/2017 2:43 PM, Michael Kavanagh wrote:
> Apologies if I hijacked this bug report, however in the master branch
> nightlies no part of the schematic is loaded, the attached error message
> is displayed. Clicking okay leads Eeschema to display "noname.sch".
>
> In the <=4.0.7 stable releases it loads all other parts of the schematic
> just not the input_protection.sch sheet. This is probably why I
> commented on this bug report as I thought they were related.

There is already a but report against this:
https://bugs.launchpad.net/kicad/+bug/1690644. Even with this bug
fixed, the test project you sent me still would not load correctly. The
input_protection.sch would fail to load because it's path is not
relative to the Top_Level.sch. It's path is relative to
Sheet_2/Sheet_2.sch. Your problem is actually an easier problem to
solve than bug 1690644. Of course you could use absolute paths to
resolve your issue but that would not make sub-projects relocatable.

>
> I shall create a separate bug report for this.
>
> ** Attachment added: "Screen Shot 2017-12-02 at 19.41.47.png"
> https://bugs.launchpad.net/kicad/+bug/1683921/+attachment/5017471/+files/Screen%20Shot%202017-12-02%20at%2019.41.47.png
>

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.