Need help with my first xaml file

I think I found an answer to my question
I created a fuction “select_line_inmodel” for selecting the object and using external event handler from pyRevitMEP External Event
changed the code for the button that ask user to pick object as follow

def SelectLineButton_Click(self, sender, e):
self.Hide()
customizable_event.raise_event(self.select_line_inmodel)
self.Show()

and all seems to be working fine now

2 Likes