Controlling room size WRT multiple sheets at one level (Multi-Channel design) - Page 1
Forum section: electronics / general

author: 741
author_rank: Frequent Contributor
timestamp: August 17, 2022, 09:27:11 pm
content: I have the following basic schematic tree structure.Top-most sheet using REPEAT(CH,1,3)A 'collection sheet' below this, which gathers multiple '.SchDoc' sheets into one sheet, and does some interconnectionSo far, I've not found a way (using the Class Generation Tab of Project Options) to create just 3 rooms (1 per channel).At present there are far too many rooms. There are 3*(Count of sheets), about 30. I'd like to generate just 1 room per channel.I tried un-ticking all room generation except for the 'collection' sheet, but then (as I recall) I got no rooms generated at all.(P.S. I don't have access to the project right now, but I can check on details tomorrow.)

author: ajb
author_rank: Super Contributor
timestamp: August 18, 2022, 04:05:06 pm
content: You can define custom rooms in the Design Rule PCB dialog, so it should be possible to do something like "InComponentClass('SubsheetA1') OR InComponentClass('SubsheetB1')" etc for each of the rooms you want. Kinda sucks to have to create three queries with ten different 'InComponentClass' calls, but hey, AltiumThese room definitions may get wiped out when doing an update from Sch. You can prevent that by going to Project Options > Comparator, under "Differences Associated with Components" change "Extra Room Definitions" to "Ignore Differences".Alternatively, it might be easier to define component classes for each channel and then use the "Generate Rooms for Component Classes" in the "User-Defined Classes" section of the Class Generation tab in Project Options, but I haven't messed with that.In order to use some of the PCB features of multichannel design, like copying room formats, you will probably need to manually set up a Design Channel Class for the channels. I think that requires creating a component class for each channel, so if you do that first you can then use those component classes to drive the Room Definition rules.I'm not sure what the best way is to get all of the components in the channel component classes, especially since the components need to be classed up per sheet *instance* rather than per sheet. If you have hierarchical designators of some sort enabled it should be fairly easy to define the classes manually using wildcards in the Classes dialog, but from there you'll have to manually update them if you add any components.It might be worth throwing together a basic example project to test some of these options without potentially screwing up your real design, there are so many project configuration options and it isn't always clear how they interact--plus you never know which ones won't work due to bugs. If you do make a sample project, make sure you have real connectivity between hierarchical sheets, otherwise Altium sometimes simply won't compile the project correctly.

author: 741
author_rank: Frequent Contributor
timestamp: August 19, 2022, 10:18:35 am
content: Thanks for all your help, lots of things to try.Out of interest, as I was testing manually created rooms (on a test project), I was wanting to define a room like thisInComponentClass('PD1') ORInComponentClass('PD2') ORInComponentClass('PD3') ORInComponentClass('PD4') ORInComponentClass('PD5') ORInComponentClass('PD6') ORInComponentClass('PD7') ORInComponentClass('PD8')Can I use a regular expression syntax? Something likeInComponentClass('PD[1..8]')The other thing I tried, (but which, frustratingly, did not work) was simply dragging a new room around all parts in one channel. This did nothing and the room definition stayed empty. However Altium say (https://www.altium.com/documentation/altium-designer/working-with-rooms)"Auto-Component AssociationBy placing a room - rectangular or polygonal - around one or more components so that they fall completely within its boundaries, the components will automatically be associated with the room."

author: 741
author_rank: Frequent Contributor
timestamp: August 19, 2022, 06:15:01 pm
content: I am finding that in my 'real' project, the room does not include the tracks."Copy room formats" does not copy tracks and moving the room omits the tracks.In my test project, the class generation options are the same, and tracks are associated with a room.--->OK, If the room encompasses the tracks, the copy works. But the room gets in the way when routing, maybe 'Enclosed and Touching Objects could be selected in the Copy dialgue...? Except I tend to make the room small and to the side of the actual palcement, just a way of moving all parts together.

author: thm_w
author_rank: Super Contributor
timestamp: August 19, 2022, 08:07:07 pm
content: If the room gets in the way when routing, why not hide them?

author: ajb
author_rank: Super Contributor
timestamp: August 19, 2022, 08:25:57 pm
content: Quote from: 741 on August 19, 2022, 10:18:35 amI think they mean when you create a new room and draw it around components it will automatically associate, but yeah, that doesn't work for me either. What does work is Design > Rooms > "Create [Rectangular/Orthogonal/Non-Orthogonal] Room from selected components". Those options automatically create a new component class containing the selected components and a new room definition rule targeting that component class.Quote from: 741 on August 19, 2022, 06:15:01 pmYeah, the room only associates directly with the components, anything else has to be enclosed by or touch the room (depending on your settings) if you want the room to be involved with it at all. Rooms are kind of a pain when routing, I tend to lock them so they don't interfere with drag-selection and set their visibility as "Draft" which removes the fill but leaves the outline visible. Hiding them would work too, as long as you don't need to see their boundaries.

author: 741
author_rank: Frequent Contributor
timestamp: August 20, 2022, 10:03:45 am
content: Re: "If the room gets in the way when routing, why not hide them?"The visible room can be a useful hint as to what components are associated with it. I'd typically be routing the parts in a given room. I don't want to accidentally route to parts from another room.It is nice to know where the 'other' room boundaries are.I like to be able to drag all the associated components by dragging the room.I'd prefer it if it were possible to hide chosen rooms and also to hide the room names on all visible rooms. With multiple (visible) rooms, those room names make the PCB almost impossible to work with because the 'designators' obscure so much.Thinking about 'Enclosed and Touching Objects' - I'd be nice if it were possible for tracks to be copied regardless of room boundary in the case where different room types have to mesh in some way.If the two different rooms are already in place, then I'd have to overlap the two rooms for track duplication to work?Perhaps the way it is meant to work is that a room does enclose all parts - and if necessary a tightly-defined polygon is used for complicated room perimeters.

author: ajb
author_rank: Super Contributor
timestamp: August 20, 2022, 11:07:40 pm
content: Yes, rooms are really meant to enclose the whole subcircuit—and nothing else, ideally. It does make it a pain to deal with situations where those subcircuits end up packed tightly together, or where you need to have unrelated tracks pass through a room. It would be nice if rooms worked more like blocks in AutoCAD, where you have to explicitly open it for editing before you can add, edit, or remove any constituent objects. (Incidentally, that’s also how Altium’s unionsshouldwork, instead of the half-assed bullshit they are now.)Here’s the workflow that I’ve found works best for rooms in multichannel projects:- get the placement and layout of one room as close to finalized as possible- once it’s there, pull the room boundaries in to tightly enclose the entire subcircuit, including routing- copy the room shape ONLY to its sibling rooms. Move all of the other components somewhere out of the way, or even delete them for the time being- fit the rooms onto the PCB, adjusting the outlines if necessary so they fit together as needed- if necessary, adjust the placement, layout, and outline of the first room, and again replicate ONLY the shape to the other rooms- repeat the above until satisfied with the way all of the rooms lay out-at this point, you can go back to the rest of the board. The rooms will reserve the space needed for the other channels, and if you find that you need to adjust the rooms to make everything work it’s still fairly easy to do that- when ready to commit to the channel layout, temporarily remove any objects that are enclosed or touched by the first room that should not be replicated to the others- NOW replicate the placement and routing of the first room to all of the others- replace any temporarily removed objects, make external connections to the channels, etcOne exception to the “only lay out one room” part of the above is when you want to try a couple of different layouts for the subcircuits to see what works best. You can replicate the first room to a second and tweak from there, or just start from scratch in a second room, and copy the outline from one or the other to the rest of the rooms to try it out.

author: ajb
author_rank: Super Contributor
timestamp: January 10, 2023, 07:33:32 pm
content: I happen to be working on a multichannel design where each channel contains multiple subsheets, and it turns out there's another, slightly easier option for getting those subsheets included in the room for the top sheet of the channel: structure classes.In Project Options, Class Generation tab, check the "Generate Structure" box for the sheets in question. Structure classes can contain other classes, including other structure classes. So the project should generate a component class for each sheet, as well as a structure class that contains that component class plus the structure classes generated by subsheets of that sheet.In PCB, you can then create a room definition rule using `InStructureClass` that takes the structure class of the base sheet for the channel.So for example, in my case I have four 'PORT' sheets that each include several 'IO' sheets, and the resulting class hierarchy looks like this:Code:PORTA_StructureClass|- PORTA (component class)|- IOA1_StructureClass| |-IOA1 (component class)|- IOB1_StructureClass|-IOB1 (component class)Previous caveats apply about changing the comparator options in the project to make sure the room definition rules don't get wiped out on an update from sch. There also seem to be some rough edges about how structure classes are compiled and transferred to PCB, it took a couple of tries including deleting and re-adding one sheet and then several sch->pcb updates to get everything correct in my project--this might be a result of inconsistent case sensitivity, one sheet symbol was mis-capitalized and that seemed to cause updates to go wrong.