4 Replies Latest reply on Apr 5, 2013 7:34 AM by Andreas.Schaefer

    How to trigger AddBatchAttribute in DxDesigner?

    Andreas.Schaefer

      Hello,

      We want to trigger our DxDesigner edits. So we tried to use the BlockModified event for this.


      Sub Application_BlockModified(Block)    
           MsgBox "BlockModified event fired."
      End Sub
      For Each Component In Activeview.Query(VDM_COMP,VD_SELECTED)
          Set Attr = Component.FindAttribute("My_Attribute")     If Not (Attr Is Nothing) Then        Attr.Delete

          MsgBox "Attribute deleted."

          Else

              My_Value = "Attribute_Value"

              Component.AddBatchAttributes("1 1 My_Attribute=" &My_Value )

          End If

      Next

      As use case, select a component in Dxdesigner and run the attached script. Now a property is added, but thev event is not fired. Run the script again, the property is deleted and the event is fired. Adding an attribute does not fire the event, but deleting an attribute fires the event.

      Wich event do we have to trigger
      AddBatchAttribute?

      regards,
      Andreas