First note, could you just post your code inline so I don't have to download your whole 5.5MB project directory to view ~250 lines of code.
Second note, POST THE ERROR!
I'm noticing that you are opening a form from an autocad command, then upon pressing a button. I think this requires a commandflags.modal in the method declaration.
Also noticing that you're creating all the attribute references twice, and the first time not doing anything with them. They'll need to be disposed. If all you're trying to do is test for the "PROGRAMINFO" tag then you don't need to create an AttributeReference, you can test that same property on the AttributeDefinition.
For Each idAtt In btAttRec
Dim ent As Entity
ent = trans.GetObject(idAtt, Autodesk.AutoCAD.DatabaseServices.OpenMode.ForRead)
If TypeOf ent Is AttributeDefinition Then
Dim attDef As AttributeDefinition
attDef = CType(ent, AttributeDefinition)
Dim attRef As New AttributeReference()
attRef.SetAttributeFromBlock(attDef, blockRef.BlockTransform)
Dim ptBase As New Autodesk.AutoCAD.Geometry.Point3d(blockRef.Position.X + attDef.Position.X, blockRef.Position.Y + attDef.Position.Y, blockRef.Position.Z + attDef.Position.Z)
attRef.Position = ptBase
'attRef.Rotation = attDef.Rotation
If attRef.Tag = "PROGRAMINFO" Then
bool_program_info = True
End If
End If
Next
I would suggest not using move entites and just use
blockRef.TransformBy(new Matrix3d.Displacement(blockRef.Position.GetVectorTo(pt3D1)))
I'm thinking the error is caused because you're trying to open the blockRef for write and it is not database resident