mrl989 Posted July 5, 2016 Share Posted July 5, 2016 i can use VB.net to edit normal inserted block reference's attribute textstring but it's not working for dynamic block, pls help. Best regard. Quote Link to comment Share on other sites More sharing options...
mrl989 Posted July 6, 2016 Author Share Posted July 6, 2016 Public Sub UpdateAtt(ByVal tr As Transaction, ByVal objID As ObjectId) Dim br As BlockReference = DirectCast(tr.GetObject(objID, OpenMode.ForWrite), BlockReference) Dim btr As BlockTableRecord = DirectCast(tr.GetObject(br.DynamicBlockTableRecord, OpenMode.ForWrite), BlockTableRecord) For Each attID As ObjectId In btr Dim ent As DBObject = tr.GetObject(attID, OpenMode.ForWrite) If TypeOf ent Is AttributeDefinition Then Dim AttDef As AttributeDefinition = ent If AttDef.Tag = "SH" Then AttDef.TextString = "111" End If Next End Sub If br is not dynamic block, br's attribute can edit by br's attribute collection, but it's not working for dynamic block, so i think this work can do by attribute definition but it's not working too, thanks for read... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.