Merge 2 Schematics and Keep Original Layouts and Routing

Making PCB Layouts, Manual routing, Auto-routing, Copper pouring, Updating from Schematic, Manufacturing Output
Post Reply
Message
Author
charlesR
Posts: 8
Joined: 04 Jan 2021, 16:09

Merge 2 Schematics and Keep Original Layouts and Routing

#1 Post by charlesR » 04 Jan 2021, 18:13

I have 2 separate schematics, each has it's own layout and routing which has already been completed.

Schematic_1 with Layout_1
Schematic_2 with Layout_2

The components and purpose of the 2 schematics are completely different, but they can be easily connected to work together (e.g. power supply and micro controller). The traces and layouts are very complicated so I want to avoid duplicating work that has already been done for component placement and routing.

What I would like to do is merge these two projects together, but keep the layouts and routing the same as their original layouts. I have not found a simple way to do this, so hoping someone can help or point me in the right direction.

Different strategies I have tried but without any success:

1. Copy and paste the Layout_1 into Layout_2, and use "Edit/Keep RefDes While Pasting", but then I loose all ability to "File/Renew Layout from Schematic" (so I can continue editing the merged schematic) because the Nets are duplicated in Layout after pasting. I tried to Renew "by components" and "by RefDes" and neither option worked because either layout was erased, or components were erased).

2. In schematic, I created 2 sheets: Sheet 1 copied in Schematic_1 and Sheet 2 copied in Schematic_2, then used "Edit/Sheet Type/Hierarchy Block". Switched to Layout, changed related schematic using "File/Layout Information.../Changed Related Schematic", then tried renewing using I"File/Renew Layout from Schematic". This did not work because layout for half of the components were erased.

I suppose I could rename all nets and RefDes to unique numbers, reconcile to ensure their is no overlap and then perform simple cut + paste in schematic and layouts. However I have hundreds of nets and components and I am hoping there is a simpler way.

Thanks,
Charles
Charles

Tomg
Expert
Posts: 2028
Joined: 20 Jun 2015, 07:39

Re: Merge 2 Schematics and Keep Original Layouts and Routing

#2 Post by Tomg » 05 Jan 2021, 02:23

Try making these changes to your procedure to see if it gets you any closer to your goal...
* Don't use the "Edit/Keep RefDes While Pasting" option.
* Don't use hierarchies. Put Schematic_1 on page 1 and Schematic_2 on page 2.
* Copy only one Board Outline into the new PCB, not both. Then, encompass the new combination PCB with the remaining Board Outline.
* Eliminate any copper pour overlaps between what once was two separate PCBs.
* Make sure that all reference designators in the new schematic match those of the new PCB. DipTrace should have automatically renumbered/renamed everything for you when you did the pasting. Except for global nets which will be merged, other net names will change in the new schematic for Schematic_2. The "Renew PCB from Schematic" tool should transfer those new names without a problem. You can always rename the schematic nets later and renew the PCB again.
* When running the "Renew Layout from Schematic" tool for the first time, use the "By RefDes..." option.

If you need to use hierarchies, don't forget to place one instance of the new hierarchical block into the main schematic page. Be aware that global nets inside the hierarchical portion of the schematic might create some unintended problems.
Tom

charlesR
Posts: 8
Joined: 04 Jan 2021, 16:09

Re: Merge 2 Schematics and Keep Original Layouts and Routing

#3 Post by charlesR » 05 Jan 2021, 09:24

AMAZING Tomg, your advice worked PERFECTLY!!!! Problem SOLVED! You just saved me about 50 hours of work, ONE MILLION THANKS TO YOU !! Interestingly, I discovered the exact order of operations is very important, so I added some clarifying steps to your procedure just to make this rock solid.

Here is the final (very slightly modified) procedure to others who may need to do this in future. Not to worry because this procedure it's much easier than it looks!, ;)

1. Open Schematic_1, add Sheet 2 using "Edit/Add Sheet" menu command.
2. Copy Schematic_2 into Sheet 2.
3. "File/Save As" Schematic_merged.dch (or whatever you want to name the merged schematic)
4. In PCB Layout, open Layout_2 (which was originally created using Schematic_2)
5. Delete Board Outline of Layout_2, then "Edit/Select All/Copy", then close this file. You will be copying only one Board Outline into the new PCB, not both.
6. Open Layout_1 (which was originally created using Schematic_1)
7. *Check to be sure "Edit/Keep RefDes While Pasting" option is not enabled
8. "Edit/Paste" Layout_2 into Layout_1, Then, encompass the new combination PCB with the remaining Board Outline from Layout_1
9. *Eliminate any copper pour overlaps between what once was two separate PCBs
10. *Make sure that all reference designators in the new schematic (Schematic_merged.dch) match those of the new PCB (This should be automatically done by Diptrace when using version 4.0.0.2)
11. Navigate to "File/Layout Information.../Related Schematic", click on ... and change file selection to "Schematic_merged.dch" (or whatever your merged schematic is named).
11. *When running the "Renew Layout from Schematic" tool for the first time, use the "By RefDes..." option. I recommend doing this right away just after Step 11 so everything links up.
12. Save your new "merged" PCB Layout, and now you can easily edit your schematic and update PCB layout as one merged project...nice!

Note: The order of steps shown above is critical to ensure success. Schematic_1 must be located in Sheet_1, and Schematic_2 must be located in Sheet_2, etc. Most importantly, within PCB Layout, you must open Layout_1 first and paste Layout_2 into Layout_1 next. Don't try this the other way around because it won't work and will scramble the RefDes and nets. I made this mistake the first time, so be sure to follow the order exactly as shown.

All thanks and credit is given to Tomg, so be sure to read his post for additional guidance.

Tomg wrote: 05 Jan 2021, 02:23 Try making these changes to your procedure to see if it gets you any closer to your goal...
* Don't use the "Edit/Keep RefDes While Pasting" option.
* Don't use hierarchies. Put Schematic_1 on page 1 and Schematic_2 on page 2.
* Copy only one Board Outline into the new PCB, not both. Then, encompass the new combination PCB with the remaining Board Outline.
* Eliminate any copper pour overlaps between what once was two separate PCBs.
* Make sure that all reference designators in the new schematic match those of the new PCB. DipTrace should have automatically renumbered/renamed everything for you when you did the pasting. Except for global nets which will be merged, other net names will change in the new schematic for Schematic_2. The "Renew PCB from Schematic" tool should transfer those new names without a problem. You can always rename the schematic nets later and renew the PCB again.
* When running the "Renew Layout from Schematic" tool for the first time, use the "By RefDes..." option.

If you need to use hierarchies, don't forget to place one instance of the new hierarchical block into the main schematic page. Be aware that global nets inside the hierarchical portion of the schematic might create some unintended problems.
Charles

stpaulchuck
Posts: 1
Joined: 19 Jul 2021, 04:05

Re: Merge 2 Schematics and Keep Original Layouts and Routing

#4 Post by stpaulchuck » 19 Jul 2021, 04:16

actually you can do this with as many as will fit on the board you are going to use. I am going to order from an outfit whose base size is 100mm x 100mm. I have three small circuits that can neatly fit on that size board. Saves me a bundle to just order one board for all three.

Just follow the sequence as listed above. A hat tip to tomG and charlesR. Thanks guys!

BTW, I tried Eagle for these projects and auto route is not available in the free edition. Once again, DipTrace is head and shoulders above the others IMHO.

Post Reply