The problem is Map just does not play will with Excel links. We'll have to
use an Access database. Here is what you need to do:
1) Create a new Access database file for your study. Just right click in a
folder and select the New/Microsoft Office Access Application option in the
popup.
2) Open the new Database. You will see some icons for creating tables, etc.
We will create a new table by importing your spreadsheet. Go to the File
pull down and select File/Get External Data/Import. Select your spreadsheet
with contours. The import wizard will walk you through the import process.
You will use your contour ID field as your index, so don't let the wizard
create a new index. You should see the new table for your contours when
finished. DBL click it to review the contents. You can edit the values in
the table by clicking in a field.
3) We now will create a datasource driver so Map can communicate with your
new .MDB file. Go to Windows Control Panel/Administrative tools/Data Sources
(ODBC) and on the User DSN tab pick the add button. Pick the "Microsoft
Access Driver (.mdb)" in the list.There are versions for different languages
so make sure to pick the generic one I just specified. Give it a name such
as River Study. Pick the Select button and browse to and select your new
.MDB file. Pick OK. You should see the new Datasource in the list of User
Sources. Close the data source dialogue.
4) We need to set up the data source in Map so we can link your contours to
the new datasource. Open your drawing with the contours. Select the
Toolbased Geospatial workspace. This will put you in a Map work environment
which has the tool bars you will need.. Type Mapwspace on the command line
and select the On option. This will open the Map Task Pane. Select the Map
Explorer tab on the task pane. Pick the Datasources folder, Right Click and
select configure. We need to create a Map Datasource file (UDL) to link to
the ODBC datasource we created earlier. In the dialogue type a name for your
new datasource, such as River Study. Pick OK. In the DataLink properties
dialogue, select Microsoft OLE DB Provider for ODBC drivers. Pick Next. For
Use datasource name, pick the drop down and select the ODBC connection you
made in step 3 (i.e. River Study). Jump down to item 3. and use the drop
down to pick your MDB file for the initial catalogue. Pick OK. In the Map
Task Pane, Rt click on Data Sources and pick Attach. Choose the UDL you just
created. You should see your Datasource in the Task Pane with the Contour
table listed in the Tables tree. You can view the table by double clicking
it.
5) Now we can link your contours to the database. Assuming you have created
an object data table and assigned ID's to your contours, we can
automatically link them to the database table. In the pull down menu above
the ribbon (turn it on if you don't see it), select the Setup/Convert Object
Data to Database Links. In the dialogue make sure your contour ID Object
Data table is selected in Source Object Data Table selector. Under Target
Link Template, select the Link Object data to database radio button, then
pick the Define button. The dialogue should populate with the contour ID
field fomr the Object Data table. Accept the settings and return to the
previous dialogue. Under Object Selection, choose to slect your cross
section polylines manually or use the Automatic option with a filter to
select them. Proess Proceed. Your Cross Sections should now be linked to the
table, assuming there were no mismatches between the ID numbers in yor
Object Data vs. the database table.
To check your links, dbl click the contour table to open it. Go to the
Highlight pull down and Toggle the 1st three options. This will make Autocad
zoom and pan to the cross section when you select one in the table. Try
picking a record in the contour table and see that Autocad zooms and pans to
the cross section and highlights it.
With the cross sections linked, you can now proceed to set up the query as
outlined in my previous post.
There is a major advantage to using the MBD vs. XLS file. Map wont let you
edit an XLS if it is in use in C3D, whereas you can with MDB. Thus when you
set up the query you can instantly update your cross sections with new
values from the MDB by re-running the query. You won't have to erase and
recreate them. In other words, when you add them to a C3D surface, you can
instantly update the surface with new data from the MDB for as long as you
keep the drawing open. Just re-run the query and the cross sections will
update which will in turn update the surface and gradings. However once you
close the drawing you will have to recreate the cross sections by erasing
the old and re-running the query.
One more thing to watch for..When you query the cross sections into your
surface drawing, Map will ask if you want to save the updates to the source
drawing when you close. I suggest you NOT save the edits if you want to
preserve your source cross section data as is.