I been digging in the docs and trying experiments to try to get an old old <DOS-based> Orcad netlist into my copy of Protel 99SE so at the least I can do the layout changes and not pay someone else to.. My only conclusion is that I will have to manually reformat it by hand to a Protel or Protel2 format then import it. Can someone please tell me this is not the case and advice to a more intelligent method or am I doomed to suffer the loss of income?
To my knowledge Protel only imports Protel or Protel2 format. You can write from Schematic any of many formats including the older OrCAD format, but PCB doesn't read them.
However, I have two comments:
It is not usually very difficult to reformat a net list. Even where a net list is differently organized, such as a list with the pin name as the first field of each record and the net as the second, I've used Excel to resort and modify the information to make such a list into a Tango or Protel format list. By the way, if you've access to, say, and OrCAD schematic that you could read with OrCAD, you could output a Protel or Tango netlist instead of OrCAD format. (I forget which one it is called, might be Protel.)
I seem to remember a net list translation program from RSI. So I search and find, yes:
Now, in the murkiness of my memory, there might have been a demo version of Omninet, or perhaps someone has written a translator.
So will you have to "manually reformat it by hand?" If it is a small netlist, reformating it with Excel would be a few minutes work. With a longer list, you might want to spend some time thinking about how to do the job.
I used to write utilities all the time with QuickBasic and I still use some of them. But you can do a lot with Word and Excel, perhaps with some macros....
Okay, my memory was correct that the old OrCAD net list is organized by components, each component is listed with its information, then the pins are listed, and each pin has the net name as a second field.
It's much harder to describe how to do it than it is to do it, once you have the idea, but being rather obsessed with providing user support:
So here is how I'd do the translation:
This is the OrCAD format for two components, and I've replaced spaces with asterisks just so you can see what is being done:
You don't have to have a parts section in a Protel netlist, as I recall, so I'm not going to bother with it at the moment. It is much easier to convert the component records into a parts section than it is to deal with the net records: you'll see a point in the process where you could easily extract the component data and create, in a similar way, the part section.
Notice that the part records begin with *( and the pin records begin with **(. (To put in a tab in the Replace menu, use ^t. Return is ^p.) For simplicity, I'll get rid of the first asterisk in each record since it occurs in every record except the very first and the very last. (Replace ^p* with ^p).
Since what is below would not mean much if you don't know it, I'll repeat this: ^t stands for TAB in a Word replacement dialog, and ^p stands for RETURN, i.e., New Line.
) (*00000009*0805*C9*10n *(*1*GND*) *(*2*VCC*) ) (*00000010*0805*C10*10n *(*1*5VP*) *(*2*PGND*) )
for this to work, it might be a good idea to have a close parenthesis in the first line, I've added it. (This turns out to have been useless but I don't want to edit everything below!)
Now, the reference designator is in field 4, and the pin number is in field 3 and the net name in field 4. I need to get the reference designator in front of the pin number, ultimately, with a hyphen in between them. I'll want the hyphen in field 5 with the pin name. So I want to add three field separators to the pin records plus the hyphen.
So replace ^p* with ^p****- and then -(* with -
This will give us ) (*00000009*0805*C9*10n ****-1*GND*) ****-2*VCC*) ) (*00000010*0805*C10*10n ****-1*5VP*) ****-2*PGND*) )
replacing * with ^t will allow us to paste this directly into Excel. It becomes in Excel
( 9 805 C9 10n
-1 GND )
-2 VCC )
( 10 805 C10 10n
-1 5VP )
-2 PGND )
Now I want to put the reference designator in front of every part number. To do this, I want to be able to resort the list, add a formula to some fields, and then get it back into its original order with the added material.
So I insert a column (i.e., a field), put a 1 in the first record's first field, then put the formula "=A1+1 in the first field of the second record and Fill Down, giving me a line-numbered list. To prevent these numbers from changing with the sort, I need to replace them with text instead of a formula. So I copy them and Paste Special back into place using Values. Now I can sort to my heart's content without losing the list sequence.
So I sort on Column B (with no header row), Descending. My pin records are now all at the end of the data. Into Column E, I put the formula =[field directly above]. In this demonstration list, that would be =E5. Then I use Fill Down to put this formula into that field for all the pin records. Then resort on Column A, ascending:
1 ) 2 ( 9 805 C9 10n 3 C9 -1 GND ) 4 C9 -2 VCC ) 5 ) 6 ( 10 805 C10 10n 7 C10 -1 5VP ) 8 C10 -2 PGND ) 9 )
I need to replace the formulas, again, with Values. Then I can get rid of the component records by resorting on field B and deleting all the component records and separator records, like record 5 above. At this point I can also get rid of fields A, B, C, D, and H. Now it looks like this:
C9-1GND C9-2VCC C10-15VP C10-2PGND
I want to combine what are now columns A and B. There might be a command in Excel to do it, but I don't know what it is, so I copy the data back into World (Paste Special as unformatted text) and replace ^t- with -, then I copy it back into Excel.
C9-1 GND C9-2 VCC C10-1 5VP C10-2 PGND
Now, I chose a bad example, I just grabbed it from an actual net list, and there are not two occurrences of the same net in this list.... So to make it more what we need, I'm just going to change PGND to GND. Then I sort on Column B. At this point I also move Column A to after Column B, and I added row numbers as before.
1 5VP C10-1 2 GND C9-1 3 GND C10-2 4 VCC C9-2
I now have the data in the same order as in a Protel net list. But I need to change the formatting to make it work. The Protel format begins a net record with an open parenthesis on a line by itself, followed by the net name on the next line, followed by the pin names, each on its own line, followed by a close parenthesis to indicate the end of that net's pin list.
To do this, I need to differentiate a first net record with subsequent ones with the same name. I insert a column between column A and B, enter FALSE into field B1, then the formula "=(C1=C2)" into field B2, then Fill Down and replace formulas with text.
1 FALSE 5VP C10-1 2 FALSE GND C9-1 3 TRUE GND C10-2 4 FALSE VCC C9-2
There are probably faster ways to do this, but unless you are going to do it frequently, figuring them out may not be worth it, I'm just doing what comes into my head first. The point is to get the job done in a semi-automated way. If you are going to do it frequently, the writing a utility in Basic or setting up some macros might be worth it. So:
I sort the list on Column B.
1 FALSE 5VP C10-1 2 FALSE GND C9-1 4 FALSE VCC C9-2 3 TRUE GND C10-2
(I like to do my group operations at the end if I am going to Fill Down, I'm less likely to overwrite data that way)
Again, this list doesn't really have quite enough in it to show fully how this works, So I'm going to add some more records (back in the previous stage), ending up with this:
1 FALSE 5VP C10-1 2 FALSE GND C9-1 4 FALSE VCC C9-2 3 TRUE GND C10-2 5 TRUE VCC C7-2 6 TRUE VCC C8-2
I want to replace the "TRUE" net names with a single piece of text so that I can use search and replace to get rid of it in a word processor. So I enter "netname" into the place of the first redundant net name and use Fill Down to replace all of them with that. Then I can get rid of column B.
1 5VP C10-1 2 GND C9-1 4 VCC C9-2 3 NETNAME C10-2 5 NETNAME C7-2 6 NETNAME C8-2
Then sort on column A and delete column A.
5VP C10-1 GND C9-1 NETNAME C10-2 VCC C9-2 NETNAME C7-2 NETNAME C8-2
Now I take this into a word processor and replace ^pNETNAME^t with ^t.
5VP C10-1 GND C9-1 C10-2 VCC C9-2 C7-2 C8-2
Now I make a series of replacements: I replace ^p with ^p)^p(^p and fix the first and last records. (In general with replacements and formulas and the like the first record or last record might have problems, it would take a more sophisticated formula which isn't worth the time. Just look at the beginning and end of the list... Before fixing it:
5VP C10-1 ) ( GND C9-1 C10-2 ) ( VCC C9-2 C7-2 C8-2 ) (
And after fixing it:
( 5VP C10-1 ) ( GND C9-1 C10-2 ) ( VCC C9-2 C7-2 C8-2 )
The last step is to replace ^t with ^p, and the result is a Protel net list.
( 5VP C10-1 ) ( GND C9-1 C10-2 ) ( VCC C9-2 C7-2 C8-2 )
I think it is quite important for a designer to have a strong familiarity with a word processor like Word, a spreadsheet like Excel, and a programming language. I learned Basic many years ago and never bothered to become proficient with anything else. But the point is to be able to use a computer to accomplish repetitive tasks where the software you have doesn't do exactly what you need. It would have taken me not a lot more time to translate that list that it took to write a message as a web user for this mailing list and then watch for a reply. I definitely would have had the translation done (no matter how long the net list was) before someone would come back with a utility or other instructions.
Similar techniques, by the way, can be used to directly manipulate the ASCII form of the Protel database. One may not need to do this very often, but it can be a life-saver.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * To post a message: mailto:[EMAIL PROTECTED] * * To leave this list visit: * http://www.techservinc.com/protelusers/leave.html * * Contact the list manager: * mailto:[EMAIL PROTECTED] * * Forum Guidelines Rules: * http://www.techservinc.com/protelusers/forumrules.html * * Browse or Search previous postings: * http://www.mail-archive.com/[EMAIL PROTECTED] * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *