Hello all,
I have the following Propblem.
If I Start CATIA via a Process from a C# User Form, the Space Pilot did not
work. Any suggestions
Kind regards.
Jens
C# Process and CATIA
Moderator: Moderators
Hi Jens,
Not sure we follow you.
Are you spawning a CNEXT.exe from an WinForms C# program? And when you do, the 3D mouse will not work in CATIA?
How are you configuring the environement that CNEXT.exe runs in? A common pitfall is to use the ADT_ODT_IN environment variable to speed up application start. That will cause the 3D mouse (and other input devices)support to be disabled. For more information, refer to this FAQ article.
Not sure we follow you.
Are you spawning a CNEXT.exe from an WinForms C# program? And when you do, the 3D mouse will not work in CATIA?
How are you configuring the environement that CNEXT.exe runs in? A common pitfall is to use the ADT_ODT_IN environment variable to speed up application start. That will cause the 3D mouse (and other input devices)support to be disabled. For more information, refer to this FAQ article.
Nuno Gomes
Hi NGomes
Ok, I will try to explain the Problem.
I have a C# Windows Application with a Form.
On the Form there is a Button. In the Button Click Event I do the Following
In the Environment File there is no Entry ADT_ODT_IN.
Hope this explains my problem better.
Kind regards
Jens
I have a C# Windows Application with a Form.
On the Form there is a Button. In the Button Click Event I do the Following
Code: Select all
string CATDLLPath = @"C:\Program Files\Dassault Systemes\B19_SP09\win_b64\code\bin";
string EnvironmentName = @"Catia_B19_SP09_HF0";
string ApplicationPath = @"C:\Users\Jens.Schimmelpfennig\AppData\Roaming\Test";
bool AdminMode = false;
ProcessStartInfo psi = new ProcessStartInfo("\"" + CATDLLPath + "\\CATStart.exe" + "\"");
if (!AdminMode)
{
psi.Arguments = " -run \"CNEXT.exe\" -env " + "\"" + EnvironmentName + "\"" + " -direnv " + "\"" + ApplicationPath + "\"" + " -nowindow";
}
else
{
psi.Arguments = " -run \"CNEXT.exe -admin\" -env " + "\"" + EnvironmentName + "\"" + " -direnv " + "\"" + ApplicationPath + "\"" + " -nowindow";
}
Debug.WriteLine(psi.FileName + " " + psi.Arguments);
IntPtr oCatiaHwnd= IntPtr.Zero;
bool bFound = false;
psi.UseShellExecute = false;
psi.RedirectStandardOutput = false;
psi.RedirectStandardError = true;
//Prozess starten und auf dessen Ende warten
//using (Process process = new Process())
Process process = new Process();
{
process.EnableRaisingEvents = true;
process.StartInfo = psi;
process.Start();
Application.DoEvents();
Process[] Ps = Process.GetProcesses();
int L = Ps.Length;
int timeout = 5000;
process.WaitForExit(timeout);
}
Hope this explains my problem better.
Kind regards
Jens
After some investigations, I found the Problem.
My Application needs for some Task Admin rights.
So I add a Manifest to my Application
this is the Problem. When I Change the Line above to the following
all works fine !
btw. CATIA works fine if I start CATIA with a Desktop Short cut.
Any Solutions ?
Kind regards.
Jens[/code]
My Application needs for some Task Admin rights.
So I add a Manifest to my Application
Code: Select all
requestedExecutionLevel level="requireAdministrator" uiAccess="false"
all works fine !
Code: Select all
requestedExecutionLevel level="asInvoker" uiAccess="false"
Any Solutions ?
Kind regards.
Jens[/code]