Transferred from: http://blog.csdn.net/linghe301/article/details/6386176
Always forget how to use this ArcGIS10 attachment function, this time make a record it.
In the application process of the project generally have such requirements, I have for each element of the feature related files, these files may be some scan, video, audio and other information, users often take the following methods:
1: Add a BLOB field directly to the feature class to store the files
2: Use a common attribute table (with BLOB fields) for correlation
3: Dedicated use of a common attribute table (store file path), real physical files stored on disk rather than in the database
But often everyone has the relevant requirements, but there is no relevant specifications, resulting in a lot of similar data can not be shared and need to be re-organized, ArcGIS may see this phenomenon, in ArcGIS10 added the functionality of the attachment (only GDB supports the attachment function).
Let's take a look below.
============================= Creating an attachment table ======================
We can right click on a feature class-attachments, choose Create Attachments (creating attachment table), delete Attachments (delete attachment table), when we first choose Create Attachments, A normal table (Tablename__attach) with a BLOB field is created and a relationship class (Tablename__attachrel) that will be the same as the attachment table.
Sql> desc Zd__attach
is the name empty? Type
----------------------------------------- -------- ----------------------------
Attachmentid not NULL number (38)
Rel_objectid not NULL number (38)
Content_Type not NULL NVARCHAR2 (150)
Att_name not NULL NVARCHAR2 (250)
Data_size not NULL number (38)
DATA BLOB
Note: Zd--attach (the middle is two underscores)
The relationship between the attachment table and the graph table is mainly through Rel_objectid.
If the feature class and the version registration, then the attachment table is also version registration (and is also associated with the principle of version), but for efficiency reasons, it is recommended that users in the process of adding only for the attachment of non-version editing, so that the efficiency is better.
=========================== Adding attachments ==================
Add attachments need to open edit state
Open the property sheet, open the Attachment Manager, add attachments to
========================== View Attachments ==========================
After saving the edits, we can use identify to view the attachment information
Also we can use the ArcGIS engine for Code programming
We can refer to: http://www.gisall.com/html/72/124272-3856.html
Go to ArcGIS10 attachment features