Page 1 of 1
Get boolean IsTopSolidOpen
Posted: Wed Jun 01, 2016 1:43 pm
by gmanucci
Hello!
Does somebody knows how to het if TS is already open?
not IApplication.IsConnected, before connect i want to know if TS is open.
Thanks!
Re: Get boolean IsTopSolidOpen
Posted: Wed Jun 01, 2016 9:06 pm
by JuP
Hi !
A possible way is to check windows applications processus :
Check all open processes and verify the name for each (Process.GetProcesses() + Process.GetProcessName()) or use Process.GetProcessesByName and create a control like the length or something like that.
Code: Select all
If Process.GetProcessesByName("TopSolid").Length > 0 Then
TopSolidIsOpen = True
End If
Good luck !
Re: Get boolean IsTopSolidOpen
Posted: Tue Jun 14, 2016 2:57 pm
by gmanucci
Hello!
Thanks for replying!
i'd found a way to get, just add
TopSolid.Kernel.Automating.TopSolidHost.Connect(false, 3);
if TS is open, will connect, otherwise not.
Thanks!
Re: Get boolean IsTopSolidOpen
Posted: Wed Jun 15, 2016 6:28 am
by JuP
ah cool, thanks gmanucci !
Re: Get boolean IsTopSolidOpen
Posted: Thu Jul 07, 2016 2:31 pm
by gmanucci
aw, np!
are you a missler employee?
BR
Re: Get boolean IsTopSolidOpen
Posted: Thu Jul 07, 2016 5:35 pm
by JuP
gmanucci wrote:aw, np!
are you a missler employee?
BR
yes, I'm pre-sales technician in France
Re: Get boolean IsTopSolidOpen
Posted: Thu Jul 07, 2016 5:53 pm
by gmanucci
oh, nice!
Re: Get boolean IsTopSolidOpen
Posted: Mon Feb 12, 2018 5:14 pm
by Holzknoten
Is there a simular way for TopSolid 6.18 ? #
Code: Select all
TopSolid.Kernel.Automating.TopSolidHost.Connect
???
I use this in TopSolid 6.18 and VB2010
Code: Select all
Dim TopApp as TopSolid.Application
TopApp = new TopSolid.Application
or
Code: Select all
TopApp = CreateObject("TopSolid.Application")
Both use the first open TopSolid or open a new one.
I want to direct select the TopSolid.Application from many TopSolid.Applications
Re: Get boolean IsTopSolidOpen
Posted: Thu Aug 23, 2018 6:34 pm
by gmanucci
As far as i know, it isn't possible, it will take always the first opened client, on TS7 there is an option for selecting the client by pipe name.