Hi,
I've set up a batch file mytask.cmd
containing several lines like
dgn2sdo ...
call masterload.bat
cal masterload ...
...
It runs pretty well if I activate it in a console window, but I'd like to run it as a scheduled task when most users are offline. But the first dgn2sdo job just creates the output folder and then the task seems to loop forever. It is still running after hours without consuming any ressources (cpu, memory), while it takes about 30 min in an interactive session. There is no input needed so I've no idea why it is waiting.
Regards,
Holger
In the past I have ran this as a one time operation and not re-ran it on a schedule. This is becasue you are using this to dump dgn data into the database and then not using the dgn files again. Each time you run it, you will be dropping and deleting all your Oracle spatial data and then re-creating it. Thus changes in the tables, between each run, will be lost, unless you have edited the sql scripts created by dgn2sdo to not drop the tables, which sounds unlikely.
You may have to add some additional parameters to the sqlplus and sql loader to have it not run in console mode or you may need to edit the masterload.bat file to accomidate what you want to do. Either way it does not sound like you are going to be able to automate it the way you want.
Jerry,
thanks for your response.
I've covered the sql loader stuff already by creating my own "masterload" script which runs perfectly within a scheduled task. I've actually removed the masterload calls to execute only one dgn2sdo call, but the result stays the same. It looks like that dgn2sdo doesn't work out within a scheduled task. dgn2sdo looks as if it is just a batch process like "ustation -wa..." which works perfectly for other mdl progs we have, but somehow this tool doesn't work.
My question is now, can dgn2sdo run in scheduled tasks or do I have to reinvent the wheel and create a "task-enabled" tool on my own?
regards,
Hi. Can you look at the output of your batch file and see what's wrong / where it blocks ? This may be related to security / rights. Could you ensure that you are running the scheduled task under a user account that has the right priviledges ?
Martin,
I tried to follow your advice and found the script to run under the same user on other machines (XP, W2K8), though it seems to be a machine/os dependend problem. In case it doesn't run, the process does no output at all, it did start microstation and the dgn file is locked, but only the output folder is created. While the whole process needs only a few minutes in interactive mode (for one dgn), the scheduled task seems to last, I aborted it after 20 minutes.
Do you know a good trace tool for tracing this?
the following output is from a machine where it fails.
DGN2SDO 8.11.7.113 will be running with MicroStation version (08.11.07.171).
02.02.2011 16:21:15
Effective Workspace Home = (C:\ProgramData\Bentley\MicroStation V8i (SELECTseries 1)\WorkSpace\Projects\Examples\Geospatial\defaults\)
Created Dynamic Feature Scoring rules file at: (C:\ProgramData\Bentley\MicroStation V8i (SELECTseries 1)\WorkSpace\Projects\Examples\Geospatial\defaults\xml\features\dynamicScoring\DGN2SDO_FeatureScoring.xml)
Output directory has been set to (c:\temp\r01_00)
Loading Bentley Map
Opening design file "C:\temp\test.dgn"
Obtaining instance cursor
Commencing translation
ERROR: Error encountered while translating instances = (The Property 'DGN_ID' is read only).
Do you have reference files attacehd to the drawing you are trying to process ? I have seen messages similiar to this when there is a reference file attached.
Jerry
Also this is uaually not a error perse. This is just telling you that the graphical element dgn_id property is not read/write. I beleive the dgn_id is used on the extract process to define the unique identifier of the element in the drawing.
This "error" occurs when there are no loader files created. When I run the .bat file in interactive mode everything works fine, running as scheduled task, no loader files get created and the log file is polluted with those lines
>>ERROR: Error encountered while translating instances = (The Property 'DGN_ID' is read only).
looks like for every element.
No, no reference files are attached.
I would still assume that you are not allowed to write to that folder, I would think it's a security issue. In interactive mode, do you have UAC on ? I would assume it's off and you get to do things that would normally require a UAC confirmation. You will not get that as a batch job. Could you modify your destination folders so you only write to the your users' Documents folder, or the ProgramData folder ?