At 09:47 AM 10/28/2003, you wrote:
All,
Ansoft Ensemble 5.1 is an RF design suite and analysis suite which
produces output that looks like this;

1663 RectBlock  2 4
72.70169102 33.2705964
72.70169102 33.1098652
73.10885302 33.1098652
73.10885302 33.2705964
0 0 0 0 RectBlock  2 4
73.10885302 33.1301979
101.2425915 33.1301979
101.2425915 33.2705837
73.10885302 33.2705837
etc.

Each block represents an RF element expressed as the 4 corner
coordinates in mm.

Protel fills, unfortunately, are represented by the two opposite corners of a rectangle, with rotation if applicable.


If there are no blocks that are rotated, though, this won't be a problem, and translation could be done even if there is rotation, it just gets a bit more complex.

While it is possible that a DXF form could be imported into DXP, there could be many complications. I'd be tempted to import it directly into the database.

I don't have DXP installed, and I don't find information in the manual quickly about import/export of prior versions. I'd expect it to be possible to write an ASCII pcb file.

So my question is can I place this data (with a minimum of manipulation)
directly into a ddb as shapefill blocks? I opened a new pwb and added
one block, closed it and then edited the ddb in wordpad, but I couldn't
locate my block. If someone can give me a keyword to search for, or
other pointers I'd appreciate it.

The ddb, to my knowledge, is going to be one complicated file compared to a PCB file. (actually, it might be just a control file, quite simple, in DXP, if the single database has gone south as I've heard: but it won't have the PCB information in it. What you want to do is to write a PCB file in ASCII form (and export it, if it is not directly accessible to your editing in Excel and Word. Without a lot more knowledge, I would not attempt to edit a DDB file. Anyway, my comments will be with regard to Protel 99SE.


To save an ASCII file in PCB, File/SaveAs/ASCII. Select the Documents tab and rt-click on your ASCII file. Select Export and write the file out of the .ddb (this is necessary in 99SE, it might not be in DXP.)

Open the file in Wordpad. Since the only primitive in my PCB file was a fill, this was the last record in the file.

|RECORD=Fill|SELECTION=FALSE|LAYER=TOP|LOCKED=FALSE|POLYGONOUTLINE=FALSE|USERROUTED=TRUE|X1=1000mil|Y1=700mil|X2=1640mil|Y2=1000mil|ROTATION=0.000

It's pretty easy to read. (When the fill is rotated, it is rotated about its center.)

You can create these with ease. I'd use a spreadsheet such as Excel to manipulate the data you have into Fill form for Protel. You could also make polygons, and it might be easier, because there will be no rotation question (your corners will be the PNT records for the polygon). So, for that, here is a four-corner polygon coextant with the Fill shown above:

|RECORD=Polygon|ID=0|SELECTION=FALSE|LAYER=TOP|LOCKED=FALSE|POLYGONOUTLINE=FALSE|USERROUTED=TRUE|PRIMITIVELOCK=TRUE|POLYGONTYPE=Polygon|POUROVER=TRUE|REMOVEDEAD=FALSE|GRIDSIZE=0mil|TRACKWIDTH=8mil|HATCHSTYLE=None|USEOCTAGONS=FALSE|MINPRIMLENGTH=3mil|KIND0=0|VX0=1000mil|VY0=1000mil|CX0=0mil|CY0=0mil|SA0=0.000|EA0=0.000|R0=0mil|KIND1=0|VX1=1640mil|VY1=1000mil|CX1=0mil|CY1=0mil|SA1=0.000|EA1=0.000|R1=0mil|KIND2=0|VX2=1640mil|VY2=700mil|CX2=0mil|CY2=0mil|SA2=0.000|EA2=0.000|R2=0mil|KIND3=0|VX3=1000mil|VY3=700mil|CX3=0mil|CY3=0mil|SA3=0.000|EA3=0.000|R3=0mil|KIND4=0|VX4=1000mil|VY4=1000mil|CX4=0mil|CY4=0mil|SA4=0.000|EA4=0.000|R4=0mil

There's a lot of data in there that you won't be concerned with, but I'd create the new polygons with all the data the same except for what I wanted to make. I made an unfilled polygon. It can be filled later, and that will create a host of primitives; I don't want to mess with them in the ASCII database.

To understand the polygon vertex data, I note that V stands for vertex. The other point fields may have to do with arcs, so they can be left as zeros. There may be a requirement for a complete set of fields, I don't know, it would be easy to experiment but I don't have that much time.

So VX0, VY0 would be the first vertex, and that is (1000,1000). Then VX1, VY1 is the next vertex, (1640, 1000), which can be seen to be one of the corners used in the fill above. The opposite corner would be VX3, VY3, or (1000, 700), which matches the fill. Note that the starting vertex is duplicated as the ending vertex VX4, VY4.

Note also the "ID=0" field. That should be incremented with each new polygon.

I'd import one of these polygons into Excel with the Pipe (|) being the field separator. I go back and forth between Excel and Word as I am familiar with the search and replace options in Word and they don't seem to be as versatile in Excel (I'm using Word and Excel 97). Between the two of them, I can do some pretty complex manipulations on data, changing sequence, adding fields, collapsing fields, etc.

for example, you have millimeter data with no units. Protel is going to want "mil" I think you might be able to use "mm" as a unit in the database, it's not hard to check it out! Otherwise you might, again, use the spreadsheet to convert all the data. Anyway, as an example of how to add the unit text into a field, I'll give this procedure. My guess is that there is probably an easier way.... but this works.

I'd insert a field between the coordinate and the next coordinate. I'd put the unit I'm going to use in that field and Fill Down through all the records. I think there is a way to collapse fields in Excel, but I've not been able to quickly find it. So I'd take the file into Word -- with tabs as field separators -- and would then search and replace "^tmil" with "mil", ^t being the code for Tab as ^p is the code for Return. Then I'd take it back into Excel....

The same techniques can be used to insert the field labels....

I don't know how familiar people are with massively massaging data in Excel.... So one more tip. When I start, I insert a field, put 1 into the first record (say that is cell A1), put =A1+1 into the next record and fill down. Then I select that field entirely (all records) and Copy. Then I Paste Special/Values. I've now numbered all the records. (Again, there is likely a faster way....) This allows me to sort the data 6 ways till Sunday and still recover my original sequence.

Once I have all the polygon records, I'd take it all back into Word and replace the tabs with pipes (|) and insert them all in place of the dummy record from the test file. Then that file can be loaded into PCB, and from there it can be copied and pasted as PCB primitives into PCB.

It takes longer to describe than to do....

If I was going to do this more than once or twice, I'd write a program to read the Ansoft data and write the PCB file. Not at all difficult.

If you want fills or pads and there are rotations, again, more complicated, but still not really difficult.




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

Reply via email to