I have a few library oriented scripts that run behind the scenes during off hours that I am having issues getting to work correctly in VX. For example I have a script that finds parts with missing areas in DMS and then goes and calculates an area estimate based on the placement outline and then finally load the data back into dms. Yeah it jumps around to different tools.
So in the background I am running things such as the part editor and the cell editor. In 7.9.x this was not an issue as all my environment variables were set. I figured this was going to be an easy fix, just run my script through the mgscript.exe terminal. Well its not working for me.
I am using C#. I do a simple test at first to verify the passed argument is indeed a valid library. The library is definitely valid. the code always fails on the first line in the try statement. Running outside the mgscript environment I get told I'm missing a registered COM, inside the mgscript environment I get the message that it is not a valid library. I'm not sure what I am doing wrong here.
/// Basic test to see if arguments passed in are valid. Tests to see if they are actually a recognizeable library
/// <param name="lib">The library cache to test</param>
/// True: library check passed
/// False: Library check failed
public static bool IsitaLibrary(string lib)
PartsEditorDlg PedApp = new PartsEditorDlg();
PartsDB PedDoc = PedApp.OpenDatabaseEx(lib, true);
PedDoc = null;
PedApp = null;