.NET

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

Set DB Dictionary-Autocad.Net

395 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: 375
Registered: ‎06-27-2005
Message 2 of 2 (395 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
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.