| MGDwgDataSources.getDwg |
|
String getDwg()
Gets the Autodesk DWG file name or Autodesk Map project drawing for the Autodesk DWG layer.
If the DWG contains no path, then the first one found in the DWG search path (ADL) will be used.
This method is not affected by the busy state.
none
String - The name of the Autodesk DWG file or Autodesk Map project drawing.
none
This code is designed to work with the 1stfloorplanEx6.mwf file used by the Filter DWG Layers example:
function getProperties()
{
// 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();
var dwgFile = dwgMapLayerDataSource.getDwg();
}