1, If SCDM script run in batch mode by Python?
2. Under Command Prompt, attachment file cannot run, but SCDM can run the code.
You can't run spaceclaim in batch, it has to be opened to create/manipulate geometry.
I have not checked your code but yes you can run SCDM in a command line mode with a pythonic input file to create and save a geometry file.