Get boolean IsTopSolidOpen

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, jacs, Daniel

gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26

Get boolean IsTopSolidOpen

Unread post 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!
User avatar
JuP
Major
Major
Posts: 169
Joined: Tue Sep 09, 2014 5:45 pm
Answers: 6
TopSolid Module: TopSolid'Steel
TopSolid Version: 7.14

Re: Get boolean IsTopSolidOpen

Unread post by JuP »

Hi !
A possible way is to check windows applications processus :
2016-06-01_20-55-32.png
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 !
Julien POIROT
TopSolid'Steel Product Manager
Youtube
GrabCad
Facebook
gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26

Re: Get boolean IsTopSolidOpen

Unread post 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. :D

Thanks!
User avatar
JuP
Major
Major
Posts: 169
Joined: Tue Sep 09, 2014 5:45 pm
Answers: 6
TopSolid Module: TopSolid'Steel
TopSolid Version: 7.14

Re: Get boolean IsTopSolidOpen

Unread post by JuP »

ah cool, thanks gmanucci !
Julien POIROT
TopSolid'Steel Product Manager
Youtube
GrabCad
Facebook
gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26

Re: Get boolean IsTopSolidOpen

Unread post by gmanucci »

aw, np!

are you a missler employee?

BR
User avatar
JuP
Major
Major
Posts: 169
Joined: Tue Sep 09, 2014 5:45 pm
Answers: 6
TopSolid Module: TopSolid'Steel
TopSolid Version: 7.14

Re: Get boolean IsTopSolidOpen

Unread post by JuP »

gmanucci wrote:aw, np!

are you a missler employee?

BR
yes, I'm pre-sales technician in France :wink:
Julien POIROT
TopSolid'Steel Product Manager
Youtube
GrabCad
Facebook
gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26

Re: Get boolean IsTopSolidOpen

Unread post by gmanucci »

oh, nice!
Holzknoten
Master Corporal
Master Corporal
Posts: 43
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17
Location: Hannover
Contact:

Re: Get boolean IsTopSolidOpen

Unread post 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
by Holzknoten
gmanucci
Master Corporal
Master Corporal
Posts: 49
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 6.26

Re: Get boolean IsTopSolidOpen

Unread post 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.
Post Reply