Deleting Hierarchical sheets

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

The answer is this previous forum post could benefit from a more descriptive manner for deleting schematic pages beneath the root page as it makes assumptions.
https://forum.kicad.info/t/deleting-hierarchical-sheets/40597

To say just hover the mouse over the sheet symbol and press [Del] works, if and only if the user is viewing the Root(page 1) of the schematic AND zoomed way out so that the other page(s) outline “symbols” also appear on screen.

I appreciate @paulvdh’s good faith effort in providing an answer, but many of us KiCAD users are quite new to this wonderful and amazing open-source ECAD app.

Another problem I encountered and could not find a reliable (or current) answer for is that after adding a 2nd schematic page, it just appeared as “untitled” and there was no place that I could find to give it a name.

Moving a post citing this topic here and reopening the topic.

Just tried it in v7. A pop up appears where you can edit the properties. If you don’t change it at that time, you can change it later by selecting the sheet, and editing its Properties from the context menu.

Just tried it in v7. A pop up appears where you can edit the properties. If you don’t change it at that time, you can change it later by selecting the sheet, and editing its Properties from the context menu.

Thanks @retiredfeline but I note that this too requires one to be “viewing” the root page AND zoomed back out far enough to “see” the other page(s) in order to right-click and bring up the context menu. These nuances to KiCAD 7 are very, very difficult to find in documentation or forum posts.

But at least, now I know now, and now it is.

Perhaps you should put in a feature request so that right clicking on the page in the hierarchy navigator offers not just Edit Page Number but also Properites (hotkey E). If the request doesn’t already exist.

As a newbie, I’m not inclined to request feature updates when “feature” documentation would be more than ample, plus help reduce code bloat. But then I suppose there may be those who prefer learning without reading.

Thanks, however, for the nudge. I’ve seen where others have requested feature requests and know it is possible.

It would make the UI more uniform and not require much extra code. The child sheet properties can already be accessed from the root sheet. The enhancement would make the properties accessible from the hierarchy browser.

I must say I thought it over then decided to give an enhancement request a go.

Attempting to do this was more frustrating than I expected. First followed links that said I must join the Ubuntu login.launchpad.net group only to find a redirect stating KiCAD don’t live there no more and it appeared that I must now create another login to yet another website.

Who can take time to spell all this out for me in terms that can be understood for making enhancement requests?

Start with the Report a Bug link in the application and go from there. You’ll need to create a GitLab account.

More experienced users do chime in. I’ve only done it once but I went straight to GitLab and I already had an account from my other software mischief.

Ding, ding :bell:

Open Kicad, up top, Help > Report Bug.

Gitlab will ask you to register. Just follow the instructions. You will need an email account for Gitlab to send a number code for your confirmation. (All up about 5 minutes effort to register).
When you have a Gitlab account you will be able to create an issue.

When you wish to create an issue you will be confronted with a form that is titled “New Issue”.
It is best, before creating an issue, to left click “Issues” in the Left hand column and read a few current and past issues to see the procedure for creating an issue, then follow the instructions in “New Issue”.

If you have a “Feature Request” or “Wishlist Item”, Start the Title of the issue with that wording. This saves Gitlab sorters time and effort.

If an Issue is created through “Report Bug” your Kicad and OS versions will automatically be included in the Issue, so don’t worry about including this.

I found this (deleting the “orphan” schematic) no longer works in Kicad 8:

  1. Delete sheet symbol
  2. Close project
  3. Delete “orphan” schematic file 'untitled.kicad_sch"
  4. Reopen project: when opening the root schematic page a message appears “The entire schematic could not be loaded. Errors ocurred attempting to load hierarchical sheets. Unable to open ‘…\untitled.kicad_sch’ for reading”
  5. Can work with the schematic, but the untitled sheet is still listed in the Schematic Hierarchy and the ‘untitled.kicad_sch’ is re-generated :frowning:

Getting the above message each time you open the schematic project is annoying.
What’s the proper way to delete a hierarchical subsheet symbol and the corresponding schematic file in Kicad 8?
Thank you!

Yes, I agree with that.

To avoid confusion, it’s not really a “sheet symbol”, but just a sheet, (or sub sheet, hierarchical sheet), but it’s not a symbol. Symbols come from a library.

And selecting the sheet (or hovering over it) in the schematic editor and then press [del] really should be enough. (Apart from saving your schematic when you exit the schematic editor). Deleting the orphaned sheet from the project directory is optionally. As long as it is not mentioned in the project, KiCad just ignores it just like other files inside the project directory.

I recently (last week) had a rogue sheet in my project, and deleted it from the schematic without giving it much thought, and continued working. I assumed I created that sheet myself (it’s a fuzzy project, and I’ve got a fuzzy head).
But it is possible there are bugs around deleting sub sheets. Just now I created a 3rd level sub sheet in the second level of a hierarchy and deleted it again (Using KiCad V8.0.5), and it “just worked” for me. Apparently it did not work for you. To check whether this is a bug in KiCad, you can make a copy of your project, delete any “proprietary” stuff, zip it up and post it on the forum (you do need to gain some “trust” on this forum before you can upload here, see New Member Information )

Another option is to first backup, and then use a text editor to find references to the old / deleted sheet in your project files and delete them. But do note this is a last resort option. KiCad’s files are human readable, but they are not designed to be editable and KiCad is very fussy about syntax errors when opening it’s own files.

:person_shrugging: Worked for me. At step 1 I just placed the crosshair over the subsheet rectangle and pressed Nuke, er Del, and it was gone from both the schematic and the hierarchy tree.

Ah, ok, I tried with a new hierarchical sheet, and it worked fine for me as well (the hierarchical sheet disappeared from the schematic and schematic hierarchy), but …

I still have a problem with this project; I realize now that the problematic hierarchical sheet appears in the schematic hierarchy only, but there is no sheet in the parent. Weird… is it a bug?

I created a new hierarchical sheet in the parent with the same name (‘Untitled Schematic’) and schematic file name (‘untitled.kicad_sch’); in the process, the program complains that the ‘untitled.kicad_sch’ schematic file already exists and asks whether I want to link the new hierarchical sheet to the existing file. I said yes in the hope that this association would allow me to delete the sheet from the schematic and the hierarchy … but no: two sheets appear in the hierarchy (with the same name, ‘Untitled Sheet’), both referring to the ‘untitled.kicad_sch’ file, the only difference is the page number; deleting the sheet from the schematic deletes the newly added only.

So, now I have two questions:

  1. How did I get there? I mean, how could I have managed to have a hierarchical sheet that doesn’t appear in the schematic of its parent? and
  2. Is there any solution to this?

Thank you!

Solved.
I opened the parent schematic with a text editor and noticed the hierarchical sheet was there, only that it had tiny dimensions, making it invisible in the parent sheet. So I changed the (size …) property of the sheet to something reasonable (size 12.7 23.81), and suddenly, the sheet was clearly visible in the parent :slight_smile:
I only had to delete the sheet from the parent, and it disappeared from the schematic hierarchy also.
So everything is fine now. I’m sorry to bother you all.

I do not consider this fully “solved” yet.
Of course it’s good for you you got it “fixed”, and only increasing it’s size with a text editor and then deleting it from within KiCad is a good “minimal impact” hack. But normally there is a limit to the minimum size of a hierarchical sheet, and it also displays the sheet name and file link in the schematic, so it should be hard to miss.

What does this tiny sheet look like in your un-modified project? Is it visible and selectable now you know it’s location?

I see two possibilities for improvements.

  1. Figuring out how your sub sheet became so tiny. (That may be difficult to do).
  2. Objects should not be (nearly) invisible or extremely tiny. Maybe this is worth a bug report or feature request. To pursue this further, verifying behavior in the nightlies would be a first logical step. Unfortunately I can’t do that right now.

Can you make a test / skeleton project with the faulty tiny sheet size, or at least copy paste the section from your schematic file that has the sheet location and size? This can help others who want to do some further debugging.

Perhaps you should open a feature request asking for a context menu when you R click on the subsheet in the hierarchy with Edit Page Number and Delete (and maybe Properties) as actions so that an invisible subsheet on the parent sheet can be recovered from.

1 Like

I had (previously) selected not to display the sheet name, so after manually changing its size, only a rectangle is shown in the parent. But yes, it behaves like a regular sheet (selectable, draggable, sizeable, removable).
I support the suggestion of @retiredlife feature request: add in the context menu of a sheet in the hierarchy a couple of new entries ‘delete’ and ‘properties’. That would be great.

I’ve used a backup copy to remove almost everything as a test project; what do I do with it?

If you’re familiar with gitlab, you can create an issue for this (Easy for me). If you do so, then also add a link back to this forum topic.

Alternatively, you can zip up the project and post it here, Then I can have a look at it, and possibly create a gitlab issue. Do note that before creating an issue on gitlab, you should always check for similar issues first, and there are around 1500 open issues for KiCad on Gitlab.