Community
I've got hundreds of files to convert.
In VBA, how can I batch convert field attributes in blocks to text attributes while retaining the blocks? Is there a simple way to univerally convert them all at onceusing VBA? The plotted values for the fields must be retained, too.
Explode will not retain the value of the field.
Burst will not work as it explodes the blocks as well.
You can right-click on the field and slelct "Convert to text" from the RCM. So I know that the process exists within CAD, just need to batch the process for a quantity of DWGs at a time - in VBA.
Try this trick on single attribute
Hint:
Sub Demo() Dim att As AcadAttributeReference Dim oEnt As Object Dim pickPt As Variant, tmx As Variant, ctx As Variant ThisDrawing.Utility.GetSubEntity oEnt, pickPt, tmx, ctx, vbCrLf & "Select attribute with field >>" If TypeOf oEnt Is AcadAttributeReference Then Set att = oEnt Dim attvalue As String attvalue = att.TextString att.TextString = "" att.TextString = attvalue Else MsgBox "Selected object is not an attributee reference: " & oEnt.ObjectName Exit Sub End If End Sub