Since I received so many questions about this post I am summing the
repsonses I received. Though it seems that the only real way is to go
through ESRI's SHAPE file format to get a clean translation.
-----------------------------------
Ethan,

Are you doing this using an MSLINK? What database are you using with
microstation?

You will certainly need a custom mapping file.

Here is something from our FAQ support page on our website going from shape
to dgn. It is very similar.

Thanks,

-Daniel

How to translate from Shape to DGN using MSLINK Attribute Table

FME� users often want to go from a Shape dataset that contains non-spatial
attributes whose values you want to store in a related data file associated
with the DGN output file containing the actual spatial features from the
same Shape input dataset.

In many cases, the related data file is in DBF format. Less frequently it's
in ASCII character-separated-value (CSV) or column-aligned-text (CAT)
format.

For a single DBF-related data file, the simplest case only requires the
"type" and the "key" attributes. For the "class", "ibit", "mbit", "rbit" and
"ubit" attributes, you can usually rely on the defaults. They should be
correct for the standard usage situations.

You can also use the "entity" attribute. This is used when more than one
table needs to be created. Some MicroStation users will specify the entity
number that should be used if they are using the "MSCATALOG" table in their
MicroStation environment (MSCATALOG maps entity numbers to table names).

The translation needs to create a DGN file to hold the Shape's spatial
information and a companion DBF file to hold the Shape feature's non-spatial
attribute values. The latter holds not only these non-spatial feature
values, but also an "MSLINK" attribute value for each feature. This
attribute is used to link each feature attribute row in the DBF table file
to the corresponding feature element in the DGN file.

For example, a DGN feature with an MSLINK value of 22 will have its
non-spatial attribute values stored in the DBF file in the row whose
"MSLINK" column value is also 22.

FME can perform such translations but it requires a custom mapping file to
do this.

The FME mapping file must automatically generate a unique MSLINK value for
each input Shape feature and store this value for each feature it creates in
the output DGN file. It also creates the DBF file and transfers each
feature's non-spatial attribute values from the Shape dataset to the DBF
table file. It also stores the feature's MSLINK value in the DBF file to
provide the linkage necessary to tie each spatial feature to its non-spatial
attribute values.

The transfer of the non-spatial attribute values to the DBF file is done
using the @Relate function. The correlation lines (transfer specification
lines) near the end of the mapping file usually include the following lines:

   igds_linkage{0}.type dbase \
   igds_linkage{0}.key @Count(mslinkCounter) \
   igds_linkage{0}.entity_number $(roads_entity)

The "igds_linkage{0}.<something>" names are actual attributes that FME
assigns to DGN features, just like "igds_color" or "igds_weight".

The first line sets the linkage type to "dbase".

The second line sets the key value, which is used to hold the "MSLINK" value
used by MicroStation. In this example, the value is generated using the
@Count function, which just starts at 0 and increments by one for every
feature.

Alternatively, if the Shape data already has an attribute whose value should
be used as the MSLINK value, the second line would use a transfer variable
to set the value of the "igds_linkage{0}.key" attribute to that of the Shape
attribute value, instead of artificially generating the MSLINK value with
@Count.

The third line sets the entity number. In this example, it's set to a value
represented by an FME macro name called "roads_entity". This line is not
strictly necessary if you have only one DBF file. (The entity number is
needed to identify to MicroStation which DBF file to use when more than one
is present.)

You can download a sample dataset demonstrating the issues described in this
FAQ.

The zip file contains an input Shape dataset called "roads", an FME mapping
file called "shape2dgn.fme", the resulting DGN output file called
"roads.dgn" and its related DBF file called "roadsForDGN.dbf".

The Shape dataset contains just two lines. Two non-spatial attributes are
defined for them: a character string called "PAVEMENT" and a number called
"LENGTH".

When you run the mapping file(drag and drop it into the FME main window) and
specify the "roads" Shape dataset, FME will create the DGN output along with
the DBF file. The values for the LENGTH and PAVEMENT attributes for each
linear feature are transferred to the DBF file.

With regards to ODBC output, FME currently supports only ODBC reading, not
writing. This means that FME can be used to go from Shape > DGN with a
related attribute table in DBF, CSV, CAT or free-form ASCII format, but not
in ODBC format. A future version of FME will allow this.

-------------------------------------
The simplest way I've found is to export the MapInfo table to a DXF and
tick the "preserve attributes" box in the DXF export dialog.  Then when you
import this into Microstation, in the import dialog there is an option to
convert DXF attribute data to tag or text - I usually set this to tag.  You
also need to set convert DXF blocks to shared cells.  This is not the most
elegant solution, but I think anything better needs a third party add on.
However, we did use this method quite successfully on a large project.  The
main drawback of this method is that to preserve the tag data the objects
you import have to remain as shared cells and therefore cannot be edited
(ie you can't drop them to lines or strings etc). The way round that is to
have two seperate imports of the same data: one with attribute data and one
without and perhaps referencing the attributed data behind the non
attributed data.  But I suppose this all depends on what you want from the
attribute data.

All the best
Steve McArthur



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to