HOW TO

Access attribute linkages after using IGDSARC

Last Published: April 25, 2020

Procedure

Summary

This document shows how to use the attribute linkage INFO files after running IGDSARC.

Procedure

When IGDSARC is used with either the FILE or ATTBOTH options, and attribute linkages are maintained in the design file (.dgn), at least one of three INFO files is created, which will be used to link the attribute table with the appropriate FAT. The three possible INFO files are:

1) COVER.STDDB 
2) COVER.DMRS
3) COVER.USER

Refer to the on line help of IGDSARC, for a description of each of these files and for the usage of the mentioned options.

These files are linked to the coverage FAT, such as an arc attribute table (.aat), by the COVER-ID. In turn, these files contain key fields to the external database file which contains the other attributes from Microstation or MGE. To link the file, you must first define a relate between the FAT and the INFO link file, and then a relate between the INFO link file and the external data base file after it has been converted to an INFO file. For example:

Code:
Arc: RELATE ADD
Relation Name: STDDB
Table Identifier: COVER.STDDB
Database Name: INFO
INFO Item: COVER-ID
Relate Column: COVER-ID
Relate Type: ORDERED
Relate Access: RW

Relation Name: STD-REL
Table Identifier: COVER.DAT ----> Where this is the converted external
database file.
Database Name: INFO
INFO Item: MSLINK
Relate Column: MSLINK ----> This is the key field for standard database
linkages.
Relate Type: ORDERED
Relate Access: RW

Once the relates are created, you can access the data using a stacked relate. For example:

Code:
Arcplot: reselect cover arc stddb//std-rel//item = 20

It is very common for a feature in the coverage to have more than one record in the database linkage INFO files. This is why JOINITEM is not used to simply join the files and avoid the use of relates. In order to access all attributes in the external database file, CURSORS must be used. The following is an AML that will list all the attributes for a coverage. It should be used as an example of how to access the data in the new INFO table.

Code:
/* LISTATTRIB.AML
/*
/*P-----------------------------PURPOSE--------------------------------------
/*
/* This aml lists all database linkage attributes after a design file
/* is converted to a coverage. The external database file must be converted

/* to an INFO table, that is related to the feature attribute table by a
/* previously defined relate. It is for arcs only. The aml must be run in
/* ARCPLOT.
/*
/* Relate Example:
/* Arcplot: relate add
/* Relation Name: dmrs
/* Table Identifier: soils2.dmrs
/* Database Name: info
/* INFO Item: soils2-id
/* Relate Column: soils2-id
/* Relate Type: ordered
/* Relate Access: rw
/*
/*U------------------------------USAGE---------------------------------------
/*
/* &r listattrib <cover> <infofile> <relate_name>

/*
/*V----------------------------VARIABLES-------------------------------------
/*
/* cover: The input annotation coverage
/* infofile: The info file that contains the supplemental data
/* relate_name: relate linking the FAT to the DMRS table
/* database: the type of data base linkage. Either std, dmrs or user.
/*
/*C------------------------------CALLS---------------------------------------
/*
/* GETLIST
/*
/*============================DISCLAIMER=====================================
/*You may use, copy, modify, merge, distribute, alter, reproduce and/or
/*create derivative works of this AML for your own internal use. All rights
/*not specifically granted herein are reserved to ESRI.
/*
/*THIS AML IS PROVIDED "AS-IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
/*OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
/*MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE
/*AML.
/*
/*ESRI shall not be liable for any damages under any theory of law related
/*to your use of this AML, even if ESRI is advised of the possibilities of
/*such damage. This AML is not supported by ESRI.
/*===========================================================================

&arg cover infofile relate_name type

&if %type% cn 'std' &then &do
&sv item = mslink
&sv name = Mslink
&end

&if %type% cn 'dmrs' &then &do
&sv item = occur
&sv name = Occurrence
&end

&if %type% cn 'user' &then &do
&sv item = [response 'Enter the key item name']
&sv name = %item%
&end

&severity &error &routine bailout

/* Declare and open cursor

cursor rel declare %cover% arc
cursor rel open
cursor rel first

/* Step thru each feature in the currently selected set

&do &while %:rel.AML$NEXT%
&set feature [value :rel.%cover%-id]
&type
&type Feature [translate %cover%-id] = %feature%
cursor rel relate %relate_name% first

/* Loop thru each related record in JOIN table

&do &while [value :rel.%relate_name%//AML$NEXT]
&set record := [value :rel.%relate_name%//%item%]
&type %name% = %record%
&type
&call getlist
cursor rel relate %relate_name% next
&end
cursor rel next
&end

cursor rel (!close remove!)

&return

&routine getlist
/* routine to list all items in related table
/* workaround for problem specifying ^relate

reselect %infofile% INFO %item% = %record%
list %infofile%
aselect %infofile% INFO
&pause &seconds 4
&return

&routine bailout
&severity &error &ignore
&sv stat = [extract 2 [show cursor rel]]
&call exit
&return &error Bailing out of listjoin.aml due to error

&routine exit
&if not stat = OPEN &then cursor rel (!close remove!)
&return

Article ID:000001409

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic