.NET

Reply
Member
wbielski
Posts: 3
Registered: ‎10-21-2008
Message 1 of 4 (187 Views)

How to get a listing of the current table styles

187 Views, 3 Replies
10-28-2008 04:42 PM
Does anybody have a code snippet that shows how to get a listing of the current table styles in the drawing

Thanks
*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 4 (187 Views)

Re: How to get a listing of the current table styles

10-29-2008 02:26 AM in reply to: wbielski

Try this one

Public Shared Sub GetTableStyles()

Dim doc As Document = Application.DocumentManager.MdiActiveDocument

Dim db As Database = doc.Database

Dim did As ObjectId = ObjectId.Null

Using tr As Transaction = db.TransactionManager.StartTransaction

Try

Dim nod As DBDictionary = CType(tr.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForRead), DBDictionary)

did = nod.GetAt("ACAD_TABLESTYLE")

Dim tdic As DBDictionary = CType(tr.GetObject(did, OpenMode.ForRead), DBDictionary)

For Each eDict As DictionaryEntry In tdic

If eDict.Key <> "" Then

MsgBox(eDict.Key)

End If

Next

Catch ex As System.Exception

MsgBox(ex.StackTrace)

End Try

End Using

End Sub

~'J'~

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Member
wbielski
Posts: 3
Registered: ‎10-21-2008
Message 3 of 4 (187 Views)

Re: How to get a listing of the current table styles

10-29-2008 04:52 AM in reply to: wbielski
Hallex - thanks that did the trick.
*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 4 of 4 (187 Views)

Re: How to get a listing of the current table styles

10-29-2008 05:30 AM in reply to: wbielski
You're welcome
Cheers :smileyhappy:

~'J'~
_____________________________________
C6309D9E0751D165D0934D0621DFF27919

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community