MGDwgDataSources.setUrlTable   Go to object model Go to parent topic Go to previous topic Go to next topic

Syntax

boolean setUrlTable(string urlTable)

Description

Sets the name of the DWG URL table containing URLs to which Autodesk DWG map features are linked.

URLs can link to external databases, Web sites, and files via HTTP, FTP, or file protocols.

If this method is successful, it automatically sets the layer's rebuild flag to True. See setRebuild for more information.

When changing the URL table, several other properties may also have to be updated, including URLColumn.

Note that this method does not work during a busy state. For additional information about the busy state, refer to "Handling Busy State and Map Refresh" in the Autodesk MapGuide Developer's Guide.

Parameters

urlTable - The name of the URL table.

Returns

boolean - Returns True if successful and rebuild occurs when the property changes.

Error Codes

-1 (busy): For write operations only.

Example

This code is designed to work with the 1stfloorplanEx6.mwf file used by the Filter DWG Layers example:

function setProperties()
{
   // Get the map and selected features
   var map = getMap();
   var mapSel = map.getSelection();
   // Use the single map layer Floor Plan
   var mapLayer = map.getMapLayer("Floor Plan");
   // Get DWG data source object for the layer
   var mapLayerSetup = mapLayer.getLayerSetup();
   var dwgMapLayerDataSource = mapLayerSetup.getDwgDataSources();
   dwgMapLayerDataSource.setUrlTable("newUrlTable");
}

See Also

getUrlTable, UrlTable