Accessing UT feature classes with an external program, such as FME, succeeds.
When writing data (e.g. via FME's SDE geodatabase writer), additional program code is executed by the UT feature class extensions. (That's what feature class extensions are for.) However, the UT feature class extensions require a UT environment, which is established with each UT application, but not when accessed from external programs.
Feature class extensions are called every time the feature class is addressed. This happens automatically from ArcGIS. You can't get in the way of that either.
Turning off the UT feature class extensions does not work.
But preventing the execution of the program code does.
For this purpose, the environment variable DisableUTObjectEventManager was implemented.
This environment variable causes all UT feature class extensions to disable execution of their program code:
- If the environment variable has the value true, then the execution of the program code is disabled.
- In any other case, the program code is executed as usual.
Note: This procedure also means that the data logic must then be produced by the external program.
Inactivating the UT feature class extensions must not be done for normal operation under any circumstances. During regular work with UT for ArcGIS the UT feature class extensions are essential. Otherwise, there is a risk of functional failures and serious data errors.
Therefore, we do not recommend setting the environment variable as a system or user variable.
To handle the environment variable, it has proven useful to run the external program in a batch script (DOS console *.bat or Powershell *.ps1 or Python *.py or ...).
In it, the environment variable is set locally as a process variable and automatically switched back as soon as the action is finished.
Here is an example of a DOS console script:
Start /B /Wait "" "%FME_INSTALL%\fme.exe" "%OWN_WORKBENCH%\Test.fmw" --Parameter1 "Dummy" ...
With the local setting in a script it is excluded that this switch is not reset by mistake.
Please sign in to leave a comment.