VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2005 vba: Table objects...

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
221 Views, 2 Replies

AutoCAD 2005 vba: Table objects...

Hello all.

I was so thrilled to see table objects inlcuded in the new 2005 api, but I'm thinking it's not completely 'baked' yet...

Once I started poking around with them, I noticed some issues:

I can see the:
Table Object
Table Style Object...

But I do NOT see a Table Style Collection???

Am I missing something here?
How are you supposed to determine what Table styles exist in a given dwg?

Anybody else poking around with this yet?

Warren M
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

You've got to go thru the dictionaries, Warren: Private Sub MakeTableStyle() '+--creates a TableStyle object Dim oDict As AcadDictionary Dim aColor As New AcadAcCmColor Dim oTblSty As AcadTableStyle Dim sKeyName As String Dim sClassName As String 'grab the tablestyle dictionary object Set oDict = ThisDrawing.Database.dictionaries.Item("acad_tablestyle") sKeyName = "NewStyle" sClassName = "AcDbTableStyle" 'create the TableStyle object in the dictionary Set oTblSty = oDict.AddObject(sKeyName, sClassName) With oTblSty .Name = "Excel2Table" .Description = "Excel2Table AutoStyle" .HorzCellMargin = 0.22 .TitleSuppressed = False .SetTextHeight 3, 1.3 .SetGridVisibility 3, 3, True .SetAlignment 3, acMiddleCenter aColor.SetRGB 244, 0, 0 End With End Sub -- ___________________________ Mike Tuersley CADalyst's AutoCAD Clinic Rand IMAGINiT Technologies
Message 3 of 3
Anonymous
in reply to: Anonymous

Hmmm, interesting...

Thanks Mike!!

Warren

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost