I have defined the search path for Solidworks\api\redist on VS2017.
I have defined in code:
import Solidworks.Interop.sldworks as swApp
swApp.SldWorks.ActivateDoc() # Activate the currently open document on Solidworks
Title = swApp.ModelDoc2.GetTitle() # Idea is to get the file name as string
self.ent = self.FindName('ShowFileName') # Get textbox name
self.ent.Text = Title # Show file name as textbox text
It feels like I'm not creating an instance to access the class correctly. This feels \\\// logically correct way for me, but I do not yet understand correctly the idea behind .NET and IronPython.
If I comment all the lines and release them one by one, the WPF Application stops working after I release the ActivateDoc line.