Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Hello everybody,

Please does anyone have an idea how i can create a database instance on my ArcSDE geodatabase to store my .dwg files.

I have over 1 million of these files and would be happy to automatically extract and migrate them into a specified schema in the Geodatabase.

I am using ArcSDE 10.1 on SQL Server2008 R2

Thanks

share|improve this question
    
Have a look at FME from Safe Software - this will do what you need and a lot more besides! safe.com –  CHenderson Aug 3 '12 at 21:24
    
I was thinking there is a way to achieve this through scripting. I wrote a script that is able to convert the cadfiles into feature datasets and featureclasses and store them into a geodatabase. But this happens on individual file, I need a script that can do it in batches; since i have very many files to process –  Shade Aug 7 '12 at 15:31
    
what language is your script in? Python? –  CHenderson Aug 7 '12 at 22:21
    
Yes! Im using Python language –  Shade Aug 8 '12 at 15:33

1 Answer 1

Based on your answer to my comment I think you could probably look at writing a MS-DOS batch script to execute your Python script on your files:

SET SRC_DIR=<Directory of files>
SET PYTHON_EXE=<Path to Python.exe>
SET PYTHON_SCRIPT=<Path to Python Script>

FOR %%A IN %SRC_DIR%\*.dwg DO %PYTHON_EXE% <parameters for script>

Presumably your script will require the path to a *.dwg file to work on, so in the <parameters for script> part you can use %%A to pass in the filename of the current file in the loop. Then obviously you need to specify any other parameters your script requires to run such as Geodatabase connection settings.

share|improve this answer
    
HI Chanders, Thanks a lot for your help, please I have a few questions here, I dont quite understand what you mean by the geodatabase connection settings - Actually the python script i have written accesses my .dwg folder, picks up the specified file and acts on it and converts it to a feature dataset and stores it in a geodatabase. but I am only able to do this for individual file but i need it to br iterate through all the .dwg files in the speficied folder location. –  Shade Aug 9 '12 at 14:12
    
my second question is this, should i run the batch script directly from the cmd interface (tried it but it keeps giving me some syntax error). I wrote it out on a notepad and save it as pytdos.bat, and run it but im not sure if its ok –  Shade Aug 9 '12 at 14:21
    
here is what I have - SET SRC_DIR=<C:\CADdata> SET PYTHON_EXE=<C:\Python27> SET PYTHON_SCRIPT=<C:\Users\iegbulefu\Documents\my scripts> FOR %%A IN %SRC_DIR%*.dwg DO %PYTHON_EXE% <%%A> –  Shade Aug 9 '12 at 14:23
    
Remove the < > as they were there to indicate where you should put your own value. That is probably why you ate getting a syntax error. Also, if any of your directory or file paths have spaces the. Make sure you enclose them in " –  CHenderson Aug 10 '12 at 13:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.