[PEDA] Importing OrCAD Netlists into a Protel 99SE layout..

2003-09-11 Thread Abd ul-Rahman Lomax
At 09:46 AM 9/11/2003, Website Visitor wrote:
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:
http://www.rsi-inc.com/Products/Translation/netlist/omninet.html

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.

)
(*0009*0805*C9*10n
*(*1*GND*)
*(*2*VCC*)
)
(*0010*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
)
(*0009*0805*C9*10n
-1*GND*)
-2*VCC*)
)
(*0010*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 

Re: [PEDA] Importing OrCAD Netlists into a Protel 99SE layout..

2003-09-11 Thread Matt . VanDeWerken
IMNSHO, protel and other cad packages went a long way backwards when they
moved away from text formats. Sure, binary might be smaller, and harder to
reverse-engineer, but there's nothing like being able to run a design
through a shell script and being able to change numerous values. Scripting
languages, whether via excel/word macros, VB programs, or sed/awk and
friends, are very powerful things for manipulating text. They don't work so
well on binary files.

Cheers,
Matthew van de Werken - Electronics Engineer
CSIRO Exploration  Mining - Gravity Group
1 Technology Court - Pullenvale - Qld - 4069
ph:  (07) 3327 4685 fax:  (07) 3327 4455
email:  [EMAIL PROTECTED]
Send HTML email?
http://www.georgedillon.com/web/html_email_is_evil_still.shtml


snip explanation of how to do it


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 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]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Re: [PEDA] Importing OrCAD Netlists into a Protel 99SE layout..

2003-09-11 Thread Abd ul-Rahman Lomax
At 08:30 PM 9/11/2003, you wrote:
IMNSHO, protel and other cad packages went a long way backwards when they
moved away from text formats.
One of the nice features of Protel is that the PCB ASCII file format is 
self-documenting. You don't need a manual to read it, though sometimes you 
might need to experiment a bit to nail down some of the fields. However, 
the text file is much larger than the binary, which means it takes longer 
to read and write; in my view, therefore, it is a plus that both formats 
are available.

(Is there critical information in DXP binary that is lost in the ASCII?)

I just pulled a record out of an ASCII PCB file.

|RECORD=Track|NET=79|SELECTION=FALSE|LAYER=TOP|LOCKED=FALSE|POLYGONOUTLINE=FALSE|USERROUTED=TRUE|X1=4405mil|Y1=4225mil|X2=4416.6mil|Y2=4236.6mil|WIDTH=8mil|SUBPOLYINDEX=0

The only fields that might be obscure are the ones to do with polygons, and 
I think one could dig that out pretty quickly by creating a PCB file with a 
single polygon on it, and filling it, then saving it as ASCII. There will 
be a Polygon record with all the vertices and polygon attributes, and a 
bunch of Track records associated with the polygon. You can have polygon 
records without tracks (unfilled and perhaps invisible) but not polygon 
tracks without a polygon records.

But most of the things you might want to do do not involve mysterious fields.

The NET field is a number rather than the net name. If you've ever seen 
more than one net of the same name in a Protel file, now you know how that 
might be possible: when a net list is loaded, the nets are given a number, 
and it is the number which is used everywhere. Normally there will not be 
duplicate net names, but I think there are some conditions that create 
them. It's a bug, but I don't recall it ever causing a problem.

So if you want to know what net this track belongs to, you have to find the 
NET record. Just search on RECORD=Net|ID=79.

|RECORD=Net|ID=79|SELECTION=FALSE|NAME=AIN2|VISIBLE=TRUE|COLOR=16777215

If you know about Protel nets and what attributes they have, you know 
nearly everything about this record with no manual. Nice, eh?



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 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]
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *