.NET

Reply
New Member
rajee_arch
Posts: 2
Registered: ‎10-05-2006
Message 1 of 2 (401 Views)

Set DB Dictionary-Autocad.Net

401 Views, 1 Replies
10-05-2006 01:55 PM
Anybody can help in coding or book reference for Set DBDictionary using VB.NET

Regards,
Raji
Mentor
MarkPendergraft
Posts: 385
Registered: ‎06-27-2005
Message 2 of 2 (401 Views)

Re: Set DB Dictionary-Autocad.Net

10-05-2006 02:39 PM in reply to: rajee_arch
could you be more specific, as to what you would like to do with the DBDictionary??????????

for example, here is some code one of my program uses to load layerstates into a form's listbox:

Dim db As Database = HostApplicationServices.WorkingDatabase
Dim LayState As DictionaryEntry
Dim oLSM As LayerStateManager
Dim oLSMDict As DBDictionary

Using trans As Transaction = db.TransactionManager.StartTransaction
Try
oLSM = db.LayerStateManager
oLSMDict = trans.GetObject(db.LayerStateManager.LayerStatesDictionaryId(True), OpenMode.ForRead)
Catch ex As Exception
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
ed.WriteMessage("*Error Ocurred in Loading Layer States*")
End Try
trans.Commit()
End Using
Form_LSM.tb_Name.Text = ""
Form_LSM.lb_LayStates.Items.Clear()

For Each LayState In oLSMDict
myForm.lb_LayStates.Items.Add(LayState.Key.ToString)
Next
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.