Message 1 of 9
Create a layer and set as current using VB.NET
Not applicable
02-26-2008
07:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anyone advice me a solution for the following scenario:
User enters a layer name in a textbox. I need to pass this layer name to my command method, create a layer and set the layer as current programmatically.
Here is the snippet of source code in VB.NET:
Dim myLayerTable As DatabaseServices.LayerTable
Dim myLayer As New DatabaseServices.LayerTableRecord
myLayerTable = myDB.LayerTableId.GetObject(DatabaseServices.OpenMode.ForWrite)
------------------------------------------------------
myLayer.Name = "Test Layer"
---------------------------------------------------------
myLayerTable.Add(myLayer)
I need to set myLayer.Name to whatever user enters in the textbox . I also need to set the newly created layer as current layer
I know how to do it in object oriented programming. But looks like I ran out of ideas here.
Thanks in advance for your advice.
User enters a layer name in a textbox. I need to pass this layer name to my command method, create a layer and set the layer as current programmatically.
Here is the snippet of source code in VB.NET:
Dim myLayerTable As DatabaseServices.LayerTable
Dim myLayer As New DatabaseServices.LayerTableRecord
myLayerTable = myDB.LayerTableId.GetObject(DatabaseServices.OpenMode.ForWrite)
------------------------------------------------------
myLayer.Name = "Test Layer"
---------------------------------------------------------
myLayerTable.Add(myLayer)
I need to set myLayer.Name to whatever user enters in the textbox . I also need to set the newly created layer as current layer
I know how to do it in object oriented programming. But looks like I ran out of ideas here.
Thanks in advance for your advice.