AutoCAD Map 3D

Community Scoring

Was this page helpful?

Tag Tags0

This page has no tags

Page statistics

885 views1 edit(s)7544 characters(s) Page last modified 12:15, 10 Apr 2012 by contentconnector
How to add your knowledge

Procedure

    Table of contents
    No headers

    The write, edit and delete operations are followed by read operations for verification. This procedure also tells you how to monitor the effects of the application operations in the Oracle database using Oracle SQL*Plus commands.

    To use this sample:

    1. Build the sample. The plugin (VBSample02.dll or CSSample02.dll) and the associated .tbp file are copied to the AutoCAD Map 3D Client bin directory.
    2. Start AutoCAD Map 3D and open the TBSAMPLE workspace.
    3. Click the application toolbar button with the Sample 02 - Read Write Features tooltip. The sample’s dialog box is displayed.
    4. Click the Write Point button.
      Note

      A form with a progress bar is displayed. This indicates that a connection is being made to the AutoCAD Map 3D workspace. At the end of the write operation the connection is closed. Each time you click a button on this form a connection to a workspace is opened and closed. The descriptions of the other operations do not repeat this information.

    5. In the XY Input dialog box, type a number in the X text box and in the Y text box and click OK. The result is that an untitled message box is displayed telling the feature ID number of the point that you just added. Click OK.

      To display the results of this operation in the TBSAMPLE user tables in your Oracle instance, enter the following commands at a command prompt:

      sqlplus /nolog
      connect tbsample/avs
      select fid,geom from mypoint;
      
    6. Click the Read Point button. Type the feature ID number returned by the write point operation into the FID text box in the Feature Class ID dialog box. Click OK. A message box is displayed showing the X and Y values that you specified during the write point operation. Click OK.
    7. Click the Edit a Point button. Type the feature ID number returned by the write point operation into the FID text box in the Feature Class ID dialog box. Click OK. In the XY Input dialog box type a number in the X text box and in the Y text box and click OK. Use Read Point from the previous step again to verify that you have changed the values of this feature.
    8. Click the Delete a Point button. Click the OK button in the TBConnectionState: Successful message box. Type the feature ID number returned by the write point operation into the FID text box in the Feature Class ID dialog box. Click OK. Click the OK button in the Deletion of MYPOINT Feature With FID = <number> Succeeded message box.
    9. Click the Read Point button. Type the feature ID number returned by the write point operation into the FID text box in the Feature Class ID dialog box. Click OK. Click the OK button in the Feature With This FID Not Found message box.

    At any time during the execution of this sample, right-click MyPoint and select Show Form to display the points and lines created by this sample.