| MGDwgDataSources.getKeyColumnType |
|
string getKeyColumnType()
Gets the DWG key column data type.
This method is not affected by the busy state.
None
String - The key column data type. Values can be: Boolean, Byte, Date, Decimal, Double, Float, Integer, Numeric, SmallInt, String, Time, TimeStamp, UnsignedByte, UnsignedInteger, and UnsignedSmallInt.
We recommend that you do not use Float or Double types because of the inherent inaccuracies in comparing them.
Note that the Autodesk MapGuide Viewer API uses string values while the DWGFeatureDataSource KeyColumnType element in Map Window XML (MWX) files uses enumerated constants. For more information about MWX, refer to the Autodesk MapGuide Dynamic Authoring Toolkit Developer's Guide.
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 keyColumnType = dwgMapLayerDataSource.getKeyColumnType();
}
setKeyColumnType, KeyColumnType