Community
Gentlemen, Could somebody take a look at this . Why I can't change the value of flip. It doesn't work.
Public Sub vns_Change_Visual_Dyn_Blk_FlipIt(ByVal MyobjId As ObjectId) Dim mydwg As Document = Application.DocumentManager.MdiActiveDocument Dim MYed As Editor = mydwg.Editor Dim myDB As Database = mydwg.Database Using Tr As Transaction = myDB.TransactionManager.StartTransaction() Dim mydbObj As DBObject = Tr.GetObject(MyobjId, OpenMode.ForRead) If TypeOf mydbObj Is BlockReference Then Dim myBR As BlockReference = CType(Tr.GetObject(MyobjId, OpenMode.ForRead), BlockReference) Dim myBTR As BlockTableRecord = DirectCast(Tr.GetObject(myBR.DynamicBlockTableRecord, OpenMode.ForWrite), BlockTableRecord) Dim myBRC As DynamicBlockReferencePropertyCollection = myBR.DynamicBlockReferencePropertyCollection Try For Each myBRP As DynamicBlockReferenceProperty In myBRC Select Case myBRP.PropertyName Case "Flip state1" myBRP.Value = 1 Case Else End Select Next Catch ex As Exception MsgBox("ERROR IN SET PARAMS TO DYN BLOCK " & ex.Message) End Try End If Tr.Commit() End Using End Sub
Solved! Go to Solution.
Solved by Jeffrey_H. Go to Solution.