def onSelectGenerate(self,evt): countermeasure = self.theParentDialog.objts[self.theParentDialog.selectedLabel] cmId = countermeasure.id() try: b = Borg() dbProxy = b.dbProxy assetId = dbProxy.addAsset(AssetParametersFactory.build(countermeasure)) dbProxy.addTrace('countermeasure_asset',cmId,assetId) except ARMException,errorText: dlg = wx.MessageDialog(self,str(errorText),'Generate countermeasure asset',wx.OK | wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() return