I have written a VBA routine using object DBX that inserts issue information onto the border sheet. It works well and is super fast, with one exception. The attributes of the block are justified middle center. Unfortunately, they loose their justification when inserted by oDBX.
Here's a portion of the code:
Code:
Set BlockReference = oDBX.PaperSpace.InsertBlock(Ipt, IssueBlock, 1#, 1#, 1#, 0#)
'BlockReference.Update
For Each Attrib In BlockReference.GetAttributes
With Attrib
Select Case UCase(.TagString)
Case "REV"
.TextString = IssueFields(0)
Case "DESCRIPTION"
.TextString = IssueFields(1)
Case "DATE"
.TextString = IssueFields(2)
Case "DWN"
.TextString = IssueFields(3)
Case "CHKD"
.TextString = IssueFields(4)
Case "APD1"
.TextString = IssueFields(5)
Case "APD2"
.TextString = IssueFields(6)
End Select
End With
Next Attrib
The block update is commented out because it appears to have no effect on the insertion.
Attached is a snapshot of the result. The first three issues were inserted manually, the fourth by my program. The real irony is that if I open the file in Acad and click the new block to edit it, then close the edit, the attributes jump into position. I suspect the problem is that oDBX can't deal with the justification positions.
Any ideas for workarounds? This program is to update over 1100 sheets, which currently takes about 4 days of manual labor!