Get boolean IsTopSolidOpen

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

Moderators: remi77, Daniel, jacs

Post Reply
gmanucci
Master Corporal
Master Corporal
Posts: 47
Joined: Tue Sep 29, 2015 2:48 pm
TopSolid Module: TopSolid'Cam
TopSolid Version: 7.7

Get boolean IsTopSolidOpen

Post by gmanucci » Wed Jun 01, 2016 1:43 pm

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
Master Chief
Master Chief
Posts: 122
Joined: Tue Sep 09, 2014 5:45 pm

Re: Get boolean IsTopSolidOpen

Post by JuP » Wed Jun 01, 2016 9:06 pm

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 . P
Youtube
Grabcad

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

Re: Get boolean IsTopSolidOpen

Post by gmanucci » Tue Jun 14, 2016 2:57 pm

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
Master Chief
Master Chief
Posts: 122
Joined: Tue Sep 09, 2014 5:45 pm

Re: Get boolean IsTopSolidOpen

Post by JuP » Wed Jun 15, 2016 6:28 am

ah cool, thanks gmanucci !
Julien . P
Youtube
Grabcad

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

Re: Get boolean IsTopSolidOpen

Post by gmanucci » Thu Jul 07, 2016 2:31 pm

aw, np!

are you a missler employee?

BR

User avatar
JuP
Master Chief
Master Chief
Posts: 122
Joined: Tue Sep 09, 2014 5:45 pm

Re: Get boolean IsTopSolidOpen

Post by JuP » Thu Jul 07, 2016 5:35 pm

gmanucci wrote:aw, np!

are you a missler employee?

BR
yes, I'm pre-sales technician in France :wink:
Julien . P
Youtube
Grabcad

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

Re: Get boolean IsTopSolidOpen

Post by gmanucci » Thu Jul 07, 2016 5:53 pm

oh, nice!

Holzknoten
Master Corporal
Master Corporal
Posts: 31
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.14
Location: Münster

Re: Get boolean IsTopSolidOpen

Post by Holzknoten » Mon Feb 12, 2018 5:14 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest