hexagon logo

Start PC-DMIS in Operator Mode via Code

I would like to start PC-DMIS in operator mode, specifically to disable the Edit Window. Here is the snippet of the C# code:
app = (PCDLRN.Application)Activator.CreateInstance(Type.GetTypeFromProgID("PCDLRN.Application"));
progs = app.PartPrograms;
events = app.ApplicationEvents;
app.Visible = true;
app.OperatorMode = true;

Unfortunately, the user can still open the Edit Window (View -> Edit Window) to make changes to the program. Does anyone have a sample code that does what I'm trying to do?

Thanks.
Parents
  • Yes, thanks for posting the solution. It works! However, using the AutomationStartupOption.txt file, I'm seeing a difference in the PC-DMIS behavior when exiting the application. Open PC-DMIS in operator mode ("C:\Program Files\Hexagon\PC-DMIS xxx\Launcher\HexagonLauncher.exe" LauncherPC-DMIS.config /o), it forces the PC to sign out the user when exiting the application. Using the AutomationStartupOption.txt and automation, it does not. Have you observed similar behavior as well? I would like to sign out the user. Is there a way to do so? Thanks!
Reply
  • Yes, thanks for posting the solution. It works! However, using the AutomationStartupOption.txt file, I'm seeing a difference in the PC-DMIS behavior when exiting the application. Open PC-DMIS in operator mode ("C:\Program Files\Hexagon\PC-DMIS xxx\Launcher\HexagonLauncher.exe" LauncherPC-DMIS.config /o), it forces the PC to sign out the user when exiting the application. Using the AutomationStartupOption.txt and automation, it does not. Have you observed similar behavior as well? I would like to sign out the user. Is there a way to do so? Thanks!
Children