STARTAPP: Software not starting completely

STARTAPP: Software not starting completely

alexander.langenstein
Enthusiast Enthusiast
816 Views
12 Replies
Message 1 of 13

STARTAPP: Software not starting completely

alexander.langenstein
Enthusiast
Enthusiast

Hello.
I have created a custom ribbon with some custom functions...

And now i want to include an external software into the ribbon and start it from there.

 

I have created the function and at the moment it looks like this:

^C^C(startapp "C://Program Files//Itwh//KOSTRA-DWD 2020 4.2//KOSTRA-DWD-2020.exe")

 

alexanderlangenstein_0-1700658157460.png


The Software is starting, but after the loadingscreen nothing happens.

Has someone an idea what the problem is?
With other softwares i don't have the problem.

0 Likes
Accepted solutions (1)
817 Views
12 Replies
Replies (12)
Message 2 of 13

pendean
Community Legend
Community Legend
Adding LISP code to a button on the Ribbon is not going to change autocad's startup alone: may I ask where you read this would be an option or solution?

And what is "KOSTRA-DWD-2020.exe" please? What would it do once triggered?
0 Likes
Message 3 of 13

alexander.langenstein
Enthusiast
Enthusiast

i have read it in a couple of forum threads.

i have tried it with my pdf-Software and there is no problem... it starts as it should.

"KOSTRA-DWD-2020.exe" is a software from the german weather service to get rain data.

I just want to start the software from my custom Ribbon in Autocad.

In this case i only get the loadingscreen.

 

0 Likes
Message 4 of 13

CodeDing
Advisor
Advisor

@alexander.langenstein ,

 

the (startapp ...) function can be difficult sometimes. I would recommend trying to add quotes surrounding the string of the application being called. Also, it appears you're using a forward slash when you should be using a backslash. I would update it like this:

^C^C(startapp "\"C:\\Program Files\\Itwh\\KOSTRA-DWD 2020 4.2\\KOSTRA-DWD-2020.exe\"")

 

Best,

~DD

0 Likes
Message 5 of 13

paullimapa
Mentor
Mentor

Try using a single / instead of double //. A double is only needed for this \\


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 6 of 13

alexander.langenstein
Enthusiast
Enthusiast

Hi.

 

This line is not working.

alexanderlangenstein_0-1700734553519.png

 

0 Likes
Message 7 of 13

alexander.langenstein
Enthusiast
Enthusiast

This works the same as my code.
I also get the loadingscreen and after that nothing happens.

There seems to be a problem with this exact problem.
I also created a ticket for the autodesk support.

0 Likes
Message 8 of 13

paullimapa
Mentor
Mentor

Just out of curiosity does this run properly when you open Windows Explorer, locate the file and you double click on it?

C:\Program Files\Itwh\KOSTRA-DWD 2020 4.2\KOSTRA-DWD-2020.exe


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 9 of 13

alexander.langenstein
Enthusiast
Enthusiast

It works fine... no problem.
That's what surprises me.

0 Likes
Message 10 of 13

paullimapa
Mentor
Mentor

Are you running on Windows 10 or 11?

What version of AutoCAD?

Did you install latest AutoCAD updates?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 11 of 13

Sea-Haven
Mentor
Mentor

I counted 3 spaces so running a shell/startapp it can stop at the 1st space a DOS problem.

 

I would try ^C^C(startapp "C:\\Program Files\\Itwh\\KOSTRA-DWD 2020 4.2\\KOSTRA-DWD-2020.exe")

0 Likes
Message 12 of 13

CADaSchtroumpf
Advisor
Advisor

And with ActiveX? No tested, but for exemple...

 

 

(cond
	((setq folder (findfile "C:\\Program Files\\Itwh\\KOSTRA-DWD 2020 4.2\\KOSTRA-DWD-2020.exe"))
		(setq WshShell (vlax-create-object "WScript.Shell"))
		(vlax-invoke-method wshshell "Run" (strcat (substr folder 1 42) "KOSTRA-DWD-2020.exe") 1 :vlax-false)
		(vlax-release-object WshShell)
	)
	(T (princ "\nFile \"KOSTRA-DWD-2020.exe\" not found") (prin1))
)

 

 

0 Likes
Message 13 of 13

alexander.langenstein
Enthusiast
Enthusiast
Accepted solution

I have talked to the Autodesk-Support.
It seems not to be a Autocad problem.
I have tried to launch the software with a batchfile and i got the same issue.

Now we found a solution also with a batchfile:

 

CD "C:\Program Files\Itwh\KOSTRA-DWD 2020 4.2"
KOSTRA-DWD-2020.exe
exit

 


And now i start the batchfile:

 

^C^C(startapp "C:/Kostra-4.2.bat")

 

👍