In a drawing created by AutoCAD 2007, a VBA routine that works perfectly in 2000, 2002, 2004 and 2006, inserts a block with an attribute, but the attribute is not in the location as defined by the insertion point of the attdef when created in 2007. Further adding to the mystery is that if you use VBA in 2000-2006 to insert one of the blocks created in 2007, the attribute comes in at the correct location, BUT if you use the insert command the attribute comes in at the WRONG location. This is only exhibited on blocks created by VBA in 2007, not blocks created by any other version.
Any ideas?
After looking at the drawing, I tried to insert the blocks with VBA and they were all correct ... thinking that someone was playing a trick on me by moving the attributes and claiming the program did it, I tried inserting the blocks using "INSERT" .. and what do you know ... the attributes are in a different place ..
this is the code I used to insert the blocks with VBA
Sub InsertEach()
Dim Block As AcadBlock
For Each Block In ThisDrawing.Blocks
If UCase(Left$(Block.Name, 3)) = UCase("Jor") Then
ThisDrawing.ModelSpace.InsertBlock ThisDrawing.Utility.GetPoint(, "Select Point: "), Block.Name, 1, 1, 1, 0
End If
Next Block
End Sub
Please tell me I am not crazy ... run the vba routine above in the drawing and insert each of the blocks, then insert each of them using the insert command.
and this is the drawing ...